Add currying examples
This commit is contained in:
1 parent
5b514a82bb
commit
a7edad1e66
1 file changed
+4
-1
+4
-1
@@ -12,4 +12,7 @@ foo <- ->
|
||||
foo() ## Inside foo but not in baz or bar
|
||||
|
||||
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)
|
||||
Reference in new issue
Block a user