Apply a callback to an array: Difference between revisions

Content added Content deleted
m (→‎{{header|SuperCollider}}: sorry for the noise, I'm incompetent)
Line 1,663: Line 1,663:
var map = {
var map = {
arg fn, xs;
arg fn, xs;
all {: fn.value(x), x <- x };
all {: fn.value(x), x <- xs };
};
};
map.value(square,[1,2,3]);</lang>
map.value(square,[1,2,3]);</lang>