On Saturday, 6 April 2013 at 21:40:37 UTC, bearophile wrote:
First, to see the side effects you have also to call front:
Ah thank you, I did not realize a call to front was required.
But this is wrong still. map() is a higher order function, it's meant to take a function and an iterable and produce a new lazy iterable that contains the ordered results of applying the given function on each item. writeln() returns nothing (void, it's a type with just one value, void itself).
Yes, I understand, the example was just a reduced bit of code. Thanks again
