On Mon, 06 Aug 2012 11:59:29 +0200, Simen Kjaeraas <[email protected]> wrote:

This is what you want, isn't it?

recurrence!((a,n)=>a[n-1]+a[n-2])(1,1).until!(a=>a>=40000)()

That is, the meat of it. The full line:

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)())

--
Simen

Reply via email to