emit: generalizes map, filter, joiner [proposal + implementation]

Tamas via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 21 16:09:27 PDT 2016


On Monday, 21 March 2016 at 11:48:52 UTC, Seb wrote:
> Could you try to point out whats wrong with map & filter?
It's hard to do stuff like this:

assert(9.iota.emit!(int,(put,a){if(a%2) put(a*a); if(a%3==0) 
put(a);}).equal([1,9,3,25,6,49]));



More information about the Digitalmars-d mailing list