pslang/examples/jit_test.psl

6 lines
91 B
PSL

func factorial(x : i32) -> i32:
mut r = 1
while x > 0:
r = r * x
x = x - 1
return r