Paste: Fibonacci
Author: | Rich |
Mode: | factor |
Date: | Wed, 12 Nov 2008 00:59:34 |
Plain Text |
USE: locals
: fib ( n -- ) [| x! [ 0 ]
y! [ 1 ] |
[ x y + y x! y! ] times x . ] ;
Author: | Rich |
Mode: | factor |
Date: | Wed, 12 Nov 2008 01:09:20 |
Plain Text |
USE: locals
: fib ( n -- m ) 1 + [let | x! [ 0 ]
y! [ 1 ] |
[ x y + y x! y! ] times x ] ;
Author: | Rich |
Mode: | factor |
Date: | Wed, 12 Nov 2008 01:29:03 |
Plain Text |
USE: locals
: fib ( n -- m ) [let | x! [ 0 ]
y! [ 1 ] |
[ x y + y x! y! ] times y ] ;
New Annotation