Advertisement
Guest User

Untitled

a guest
May 26th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. -- Works
  2. total
  3. life : Nat -> Nat
  4. life (S (S x)) = life x
  5. life _ = 42
  6.  
  7. -- Works
  8. total
  9. life : Nat -> Nat
  10. life k = case k of
  11. (S (S y)) => life y
  12. _ => 42
  13.  
  14. -- Main.life is possibly not total due to recursive path Main.life --> Main.life
  15. total
  16. life : Nat -> Nat
  17. life (S x) = case x of
  18. (S y) => life y
  19. _ => 42
  20. life _ = 42
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement