Idris-dev/examples/wheres.idr
Jan de Muijnck-Hughes 17c7240825 Tutorial changes.
+ Tutorial is now developed in a separate github repo.
+ Moved examples to top-level
+ Added binary of tutorial for v0.9.10
2013-11-28 11:40:27 +00:00

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