Author: | Mitch |
---|---|
Mode: | factor |
Date: | Wed, 29 Sep 2010 21:48:29 |
! Create the Fibonacci sequence up to max : fib-help ( max seq -- seq' ) dup 2 tail* sum swap [ [ > ] 2keep ] dip swap suffix rot [ fib-help ] [ nip but-last ] if ; : fib ( max -- seq ) { 1 1 } fib-help ;