Array map method

Hi,

maybe it’s late but can’t seem to find an array map method (like the one in JavaScript) for transforming each of the elements in an array with a custom function. Would be something like:

~originalArray = [1, 2, 3];

~doublesArray = ~originalArray.map({
    |num|
    num * 2
});

~doublesArray.postln; // [2, 4, 6]

I know that in this particular example I could just:

~originalArray * 2

but am asking for more advanced cases.

.collect

http://doc.sccode.org/Classes/Collection.html#-collect

hjh