Why doesn't map!(a => writeln(a)) print anything?

Mark Isaacson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 17 18:05:28 PDT 2015


On Saturday, 18 April 2015 at 01:04:24 UTC, Adam D. Ruppe wrote:
> map evaluates its arguments on demand. Think of it as returning 
> a function that does the work instead of actually doing the 
> work - you still need to call that function, which happens when 
> you loop over it.
>
> std.algorithm.each is more appropriate for acting now.

Ahhh.... cool. Thanks!


More information about the Digitalmars-d-learn mailing list