On Monday, 21 March 2016 at 23:09:27 UTC, Tamas wrote:
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]));

Seems doable:
mapFilter!((a){if(a%2) return some(a*a); if(a%3==0) return some(a); return none;})

Reply via email to