mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-11-15 01:25:05 +03:00
17c7240825
+ Tutorial is now developed in a separate github repo. + Moved examples to top-level + Added binary of tutorial for v0.9.10
15 lines
242 B
Idris
15 lines
242 B
Idris
module wheres
|
|
|
|
even : Nat -> Bool
|
|
even Z = True
|
|
even (S k) = odd k where
|
|
odd Z = False
|
|
odd (S k) = even k
|
|
|
|
test : List Nat
|
|
test = [c (S 1), c Z, d (S Z)]
|
|
where c x = 42 + x
|
|
d y = c (y + 1 + z y)
|
|
where z w = y + w
|
|
|