Created
March 8, 2019 17:31
-
-
Save clementi/60b0ee4dec4753df4bd1f70217b3c0e8 to your computer and use it in GitHub Desktop.
Idris stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rev : List a -> List a | |
rev xs = revAcc [] xs where | |
revAcc : List a -> List a -> List a | |
revAcc acc [] = acc | |
revAcc acc (x :: xs) = revAcc (x :: acc) xs | |
even : Nat -> Bool | |
even Z = True | |
even (S k) = odd k where | |
odd Z = False | |
odd (S k) = even k | |
odd : Nat -> Bool | |
odd = not . even |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment