progs/fact.fun
author Christian Urban <urbanc@in.tum.de>
Thu, 26 Sep 2019 12:59:33 +0100
changeset 635 7c2c0f10c424
parent 626 2d91b2107656
child 655 3d04ee04966d
permissions -rw-r--r--
updated

def fact(n) = if n == 0 then 1 else n * fact(n - 1);

def facT(n, acc) = if n == 0 then acc else facT(n - 1, n * acc);

facT(15, 1)

//fact(15)