rubyx/stash/example.vm

11 lines
124 B
Plaintext
Raw Normal View History

function factorial(n) {
if (eq(n, 1)) {
1
} else {
times(n, factorial(minus(n, 1)))
}
}
print(factorial(4))