Skip to content

Instantly share code, notes, and snippets.

@brunoczim
Created December 2, 2018 00:45
Show Gist options
  • Save brunoczim/801f00e6dca0d41681719d30c344386b to your computer and use it in GitHub Desktop.
Save brunoczim/801f00e6dca0d41681719d30c344386b to your computer and use it in GitHub Desktop.
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