Re: Chaining std.algorithm functions

2012-04-12 Thread H. S. Teoh
On Thu, Apr 12, 2012 at 07:00:35PM +0200, DH wrote: > Hi. I was wondering why the following works: > > filter!(a => a % 2 == 0)(map!(a => a + 1)([1,2,3,4,5])) > > but the following does not: > > [1,2,3,4,5] > .map!(a => a + 1)() > .filter!(a => a % 2 == 0)() > > ...givin

Re: Chaining std.algorithm functions

2012-04-12 Thread Brad Anderson
On Thursday, 12 April 2012 at 17:00:37 UTC, DH wrote: Hi. I was wondering why the following works: filter!(a => a % 2 == 0)(map!(a => a + 1)([1,2,3,4,5])) but the following does not: [1,2,3,4,5] .map!(a => a + 1)() .filter!(a => a % 2 == 0)() ...giving me the error `Er

Chaining std.algorithm functions

2012-04-12 Thread DH
Hi. I was wondering why the following works: filter!(a => a % 2 == 0)(map!(a => a + 1)([1,2,3,4,5])) but the following does not: [1,2,3,4,5] .map!(a => a + 1)() .filter!(a => a % 2 == 0)() ...giving me the error `Error: no property 'filter' for type 'Result'` The dot