The Ackermann Function

Apropos of nothing, here’s a Grace version of Ackermann’s Function inspired by Sam Tobin-Hochstadt’s Racket example:

One interesting thing to note is that the condition after elseif is in {braces}, while the conditions after if is in (parens). This makes logical sense — because the first condition is always evaluated — but is of course inconsistent with every other condition.  (Apologies for the fixed-width font.)