Add currying examples

This commit is contained in:
Dane Johnson 2021-11-25 18:39:22 -06:00
parent 5b514a82bb
commit a7edad1e66

View File

@ -12,4 +12,7 @@ foo <- ->
foo() ## Inside foo but not in baz or bar foo() ## Inside foo but not in baz or bar
add <- x -> y -> add <- x -> y ->
return x + y return x + y ## Multivariable functions by currying
add(x) ## Returns a _function_
add(x, y) ## This is equivalent to add(x)(y)