Functional programming for Moonscript.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
curry.moon

README.md

Moon-Curry

Currying and function composition for Moonscript.

Examples

-- currying:
add = (a, b) -> a + b
sum = foldl1[add]
print sum {1, 2, 3, 4, 5}

-- function composition:
add = (a, b) -> a + b
double = (x) -> x * 2
both = double * add

print both(5, 4)