Input/Output
The input and output formats do not have to be the same, but they should be one of these:
- A type constructor of kind
* -> *
to representS
and a type of kind*
to representZ
, e.g.S<S<Z>>
to represent 2 in Java orint[][]
(int
for 0,[]
forS
). - A string with a
Z
at the middle and 0 or moreS(
s and)
s around it, e.g."S(S(Z))"
to represent 2. - Any other format resembling Peano numbers, where there is a value representing zero at the bottom, and another wrapper that can contain other values.