mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 03:45:29 +03:00
19 lines
231 B
Plaintext
19 lines
231 B
Plaintext
data N = (S pred) | Z
|
|
data B = T | F
|
|
|
|
(Not B/T) = B/F
|
|
(Not B/F) = B/T
|
|
|
|
(IsEven n) =
|
|
match n {
|
|
N/S: (Not (IsEven n.pred))
|
|
N/Z: B/T
|
|
}
|
|
|
|
N0 = N/Z
|
|
N1 = (N/S N0)
|
|
N2 = (N/S N1)
|
|
N3 = (N/S N2)
|
|
|
|
Main = (IsEven {{N0 N1} {N2 N3}})
|