amap

map and get result as array

template amap(fun...)
amap
(
Range
)
(
Range r
)
if (
isInputRange!(Unqual!Range)
)
if (
fun.length >= 1
)

Examples

int[] res = [ 1, 2, 3 ];
void func( int[] arr ) { res ~= arr; }
func( amap!(a=>a^^2)(res) );
assertEq( res, [ 1, 2, 3, 1, 4, 9 ] );

Meta