fill output range with result of fn() called per elements
1 import std.array; 2 3 auto app = appender!(int[])(); 4 mapFlat!(a=>to!int(a)*2)( app, [1,2], 3, 5 [[4,5],[6]], 6 iota(7,9), 7 [[[9],[10,11]],[[12]]], 8 Vec([13.3,666,105]) ); 9 assertEq( app.data, [2,4,6,8,10,12,14,16,18,20,22,24,26,1332,210] );
See Implementation
fill output range with result of fn() called per elements