question on map

Alain De Vos devosalain at ymail.com
Wed May 12 09:52:52 UTC 2021


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;
}

```


More information about the Digitalmars-d-learn mailing list