File:  [gforth] / gforth / fib.fs
Revision 1.1: download - view: text, annotated - select for diffs
Mon Nov 13 18:38:35 1995 UTC (24 years ago) by anton
Branches: MAIN
CVS tags: v0-6-2, v0-6-1, v0-6-0, v0-5-0, v0-4-0, v0-3-0, v0-2-1, v0-2-0, gforth-0_1beta, HEAD
added benchmark files

    1: : fib ( n1 -- n2 )
    2:     dup 2 < if
    3: 	drop 1
    4:     else
    5: 	dup
    6: 	1- recurse
    7: 	swap 2 - recurse
    8: 	+
    9:     then ;
   10: 
   11: : main 34 fib drop ;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>