Skip to content

Instantly share code, notes, and snippets.

@vincent-pradeilles
Created August 12, 2017 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vincent-pradeilles/c100c5b227205dac75cc8d75a542cbc1 to your computer and use it in GitHub Desktop.
Save vincent-pradeilles/c100c5b227205dac75cc8d75a542cbc1 to your computer and use it in GitHub Desktop.
func curry<A, B, C>(_ function: @escaping (A, B) -> C) -> (A) -> (B) -> C {
return { (a: A) -> (B) -> C in { (b: B) -> C in function(a, b) } }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment