Last active
December 1, 2016 13:03
-
-
Save lepoetemaudit/5d8e0a4673f86e9bcfa7e2b44b25329f to your computer and use it in GitHub Desktop.
Faked currying in mlfe
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
-- In MLFE | |
module curry_fun | |
export curried/1 | |
curried arg1 = | |
let curried2 arg2 = | |
let curried3 arg3 = | |
arg1 + arg2 + arg3 | |
in curried3 | |
in | |
curried2 | |
-- Calling from Erlang | |
2> (((curry_fun:curried(1))(2))(3)). | |
6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment