Closed abdellahi-brahim closed 8 months ago
you can achieve this with the array[*] syntax.
essentially apply would be defined as:
array apply(array a; function f, mixed ... args){
return f(a[*], @args);
}
apply(a, doit, 5);
would be equivalent to doit(a[*], 5);
Oooh, that is rly cool. Dynamic languages ftw ehehe
Pike already have map and filter. It would be nice to add an apply method. It's syntax would be something like this: