We can define natural numbers á là Peano by using a recursive
data type definition. We can then write out numerals in a sort of "unary notation",
by repeatedly applying Succ to Zero. Appropriate
equality and comparison functions can be defined using standard recursions.
|
Zero takes no arguments: it is essentially a new constant
Succ is pronounced "successor": it takes us from one
natural number to the next
(==), we can use infix
syntax or prefix syntax (but in parentheses)
_) can be used when we don't want to name
a variable (i.e., when we don't need to refer to it on the right-hand side)