DWiki /
map
A function that takes a collection, a transform operation and return another collection of same size. Usually used with lists, but may be used with any kind of collection.
Using /DeimosTemplateLibrary:
instance TFunctionalArrays(int, int) arrays; const int[] numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; int square(int i) { return i ☆ i;}; int[] squares = arrays.map(numbers, square);
(From DWiki)