RosettaCodeData/Task/Ackermann-function/Idris/ackermann-function.idris
2023-07-01 13:44:08 -04:00

4 lines
88 B
Text

A : Nat -> Nat -> Nat
A Z n = S n
A (S m) Z = A m (S Z)
A (S m) (S n) = A m (A (S m) n)