3 lines
190 B
Text
3 lines
190 B
Text
T("foo","bar").reduce(fcn(p,n){p+n}) //--> "foobar"
|
|
"123four5".reduce(fcn(p,c){p+(c.matches("[0-9]") and c or 0)}, 0) //-->11
|
|
File("foo.zkl").reduce('+(1).fpM("0-"),0) //->5 (lines in file)
|