Author: | max |
---|---|
Mode: | factor |
Date: | Wed, 15 Feb 2012 22:05:45 |
IN: fibo USING: math kernel sequences locals prettyprint ; : next-fib ( x y -- y x+y ) swap over + ; :: fib-produce ( max -- seq ) 1 1 [ next-fib dup max <= ] [ dup ] produce 2nip ; 4000000 fib-produce [ even? ] filter sum .