Paste: tetha iteration problem, too

Author: tetha
Mode: factor
Date: Tue, 28 Apr 2009 15:50:29
Plain Text |
: iterate ( n -- n ) dup odd? [ 3 * 1 + ] [ 2 / ] if ;
: cyclelength ( n -- n ) 0 swap [ dup 1 = not ] [ swap 1+ swap iterate ] while drop ;

New Annotation

Summary:
Author:
Mode:
Body: