0! -> 1
N! -> N * (N-1)!
Factorial in XLR
XLR is the functional variant of XL. It is intended to feel familiar to programmers who used languages such as Lisp, Scheme, Haskell, and to a certain extent Python or Ruby.
XLR has the following standard features:
if true then X else Y -> do X
if false then X else Y -> do Y
Adding "If-then-else" in XLR
XLR is based on XL, so it also offers advanced meta-programming capabilities: