mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 11:56:54 +03:00
10 lines
209 B
Plaintext
10 lines
209 B
Plaintext
type Bool = True | False
|
|
|
|
(if_ 0 then else) = else
|
|
(if_ _ then else) = then
|
|
|
|
(isOdd n) = (if_ (== n 0) Bool/False (isEven (- n 1)))
|
|
(isEven n) = (if_ (== n 0) Bool/True (isOdd (- n 1)))
|
|
|
|
(Main) = (isOdd 4)
|