Idris2-boot/tests/idris2/linear007/LCase.idr
2019-07-20 18:57:03 +01:00

12 lines
289 B
Idris

lplus : (1 x : Nat) -> (1 y : Nat) -> Nat
lplus Z y = y
lplus (S k) y = S (lplus k y)
foo : (1 x : Nat) -> (1 y : Nat) -> Nat -> Nat
foo x y z
= let 1 test = the Nat $ case z of
Z => Z
(S k) => S z
in
lplus test x