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