On Friday, 17 February 2023 at 17:42:19 UTC, Ali Çehreli wrote:
// Two different steps auto g1 = r.map!((int n) => n * n); auto g2 = r.map!((int n) => n * 10);// The rest of the algoritm auto result = choose(condition, g1, g2) .array;
Now that's a handy construct.There's many little goodies in phobos I've yet to learn, thanks for the tip!