On Tuesday, 4 July 2017 at 23:27:25 UTC, Jean-Louis Leroy wrote:
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...

using
   auto y = x.map!(x => x * x).array;
will work.

Reply via email to