how implement takeWhile

Tobias Pankrath tobias at pankrath.net
Mon Aug 6 06:13:27 PDT 2012


On Monday, 6 August 2012 at 13:10:50 UTC, Russel Winder wrote:
> On Mon, 2012-08-06 at 12:15 +0200, Simen Kjaeraas wrote:
> […]
>> writeln(recurrence!((a,n)=>a[n-1]+a[n-2])(1,1).until!(a=>a>=40000)().filter!(a=>a%2==0)().reduce!((a,b)=>a+b)())
>
> Do a JVM backend to D and D could wipe the floor with Scala :-)

Why is that? Can't Scala do the same?



More information about the Digitalmars-d-learn mailing list