== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > On 10/03/2010 10:21 AM, Simen kjaeraas wrote: > > unittest { > > assert( equal( ( list!"2 * a" | [1,2,3,4,5] & where!"a & 1" ), [2,6,10] > > ) ); > > assert( equal( ( list!"2 * a" | [1,2,3] ), [2,4,6] ) ); > > } > I wonder to what extent this improves > assert(equal(map!"2 * a"(filter!"a & 1"([1,2,3,4,5])), [2,6,10])); > One thing that's nicer with comprehensions is that you save a bit on > nested parens. > Andrei
It would be nice if we could just write: assert(equal(iota(1,6).filter!("a&1").map!("2*a"), [2,6,10])); Incidentally, why doesn't the uniform function call syntax allow this?