Created
December 2, 2018 00:45
-
-
Save brunoczim/801f00e6dca0d41681719d30c344386b to your computer and use it in GitHub Desktop.
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
module Curry where | |
record _×_ (A B : Set) : Set where | |
constructor _,_ | |
field | |
andL : A | |
andR : B | |
curry : {A B C : Set} → (A × B → C) → (A → B → C) | |
curry f = λ {x y → f (x , y)} | |
uncurry : {A B C : Set} → (A → B → C) → (A × B → C) | |
uncurry f = λ {(x , y) → f x y} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment