Scientific Calculator

(public) Kuba/ackermann

By Kuba 1234567890

to taki skrypt

Tagged: constant

var Ackermann = function(m, n) {
m == 0 ?
n+1
: m > 0 and n == 0 ?
Ackermann(m - 1, 1)
: m > 0 and n > 0 ?
Ackermann(m - 1, Ackermann(m, n - 1))
:
error()
}

spam? | offensive?

0 Comments

Sign in to leave a comment