Re: question on map

2021-05-12 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 12 May 2021 at 09:52:52 UTC, Alain De Vos wrote: As oppposed to what i expect code below prints nothing nothing on the screen. What is wrong and how to fix it ? ``` import std.stdio; import std.range:iota; import std.algorithm:map; bool mywriteln(int x){ writeln(x);

Re: question on map

2021-05-12 Thread visitor via Digitalmars-d-learn
On Wednesday, 12 May 2021 at 09:52:52 UTC, Alain De Vos wrote: As oppposed to what i expect code below prints nothing nothing on the screen. What is wrong and how to fix it ? ``` import std.stdio; import std.range:iota; import std.algorithm:map; bool mywriteln(int x){ writeln(x);

Re: question on map

2021-05-12 Thread Berni44 via Digitalmars-d-learn
On Wednesday, 12 May 2021 at 09:52:52 UTC, Alain De Vos wrote: As oppposed to what i expect code below prints nothing nothing on the screen. What is wrong and how to fix it ? ``` import std.stdio; import std.range:iota; import std.algorithm:map; bool mywriteln(int x){ writeln(x);

question on map

2021-05-12 Thread Alain De Vos via Digitalmars-d-learn
As oppposed to what i expect code below prints nothing nothing on the screen. What is wrong and how to fix it ? ``` import std.stdio; import std.range:iota; import std.algorithm:map; bool mywriteln(int x){ writeln(x); return true; } void main(){ 5.iota.map!mywriteln; }