Casting MapResult
jmh530 via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jun 15 12:22:29 PDT 2015
On Monday, 15 June 2015 at 19:04:32 UTC, Baz wrote:
> In addition to the other answers you can use
> std.algorithm.iteration.each():
>
> ---
> float[] _exp(float[] x) {
> auto result = x.dup;
> result.each!(a => exp(a));
> return result;
> }
> ---
Am I right that the difference is that map is lazy and each is
greedy? Does that have any significant performance effects?
More information about the Digitalmars-d-learn
mailing list