Paste: euler002

Author: pggb
Mode: factor
Date: Sun, 28 Oct 2012 19:42:18
Plain Text |
: next-fib ( a b -- b c )
    [ + ] keep swap ;

: euler002 ( -- n )
   1 2 0 
   [ over dup even? [ + ] [ drop ] if 
   [ next-fib ] dip dup 4000000 < ] loop 2nip ;

New Annotation

Summary:
Author:
Mode:
Body: