Append to 'map' result

Jean-Louis Leroy via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 4 16:27:25 PDT 2017


I want to create a range that consists of the result of a map() 
followed by a value, e.g.:

   int[] x = [ 1, 2, 3];
   auto y = map!(x => x * x)(x);
   auto z = y ~ 99; // how???

I have tried several variations: convert 99 to a dynamic array, 
to a range, convert range to dynamic array (couldn't even figure 
that one); to no avail.

Help please...




More information about the Digitalmars-d-learn mailing list