// Compiler: // stdout: 120 func factorial(x: i32) i32 { if x == 0 { return 1; } else { return factorial(x - 1) * x; } return 1; } extern func printf(x: *char,...) void; pub func main() i32 { printf("%i\n",factorial(5)); return 0; }