Last active
June 30, 2017 07:00
-
-
Save RyanCCollins/e3c57eb9a96ed66344b554b1c9fe1a22 to your computer and use it in GitHub Desktop.
Swift currying
This file contains hidden or 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
func curried(_ f: @escaping (_: Int, _: Int) -> Int) -> (_: Int) -> (_: Int) -> Int { | |
return { a in { b in f(a, b) }} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment