Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
6
Task/Currying/Zkl/currying.zkl
Normal file
6
Task/Currying/Zkl/currying.zkl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
addOne:= Op("+").fp(1); addOne(5) //-->6
|
||||
minusOne:=Op("-").fp1(1); minusOne(5) //-->4, note that this fixed 1 as the second parameter
|
||||
// fix first and third parameters:
|
||||
foo:=String.fpM("101","<foo>","</foo>"); foo("zkl"); //-->"<foo>zkl</foo>"
|
||||
fcn g(x){x+1} f:=fcn(f,x){f(x)+x}.fp(g); f(5); //-->11
|
||||
f:=fcn(f,x){f(x)+x}.fp(fcn(x){x+1}); // above with lambdas all the way down
|
||||
Loading…
Add table
Add a link
Reference in a new issue