more work on case

This commit is contained in:
2024-08-22 13:33:16 -07:00
parent 1fef9dcfc6
commit f6e47c8d22
8 changed files with 169 additions and 19 deletions

View File

@@ -13,6 +13,14 @@ plus = \ n m => case n of
Z => m
S k => S (plus k m)
-- Example from Jesper talk (translated to case tree)
max : Nat -> Nat -> Nat
max = \ n m => case n of
Z => m
S k => case m of
Z => S k
S l => S (max k l)
-- So this isn't working at the moment, I think I need
-- to replace the n with S k
--