Apply a callback to an array: Difference between revisions
m
→{{header|Guish}}
No edit summary |
|||
Line 1,655:
=={{header|Guish}}==
{{works with|guish|2.1.
<syntaxhighlight lang="guish">
# applies add2 (adds 2) to each element
map = {
r =
args = [
for x @args {
r = [@r, call(@1, @x)]
|