]> gitweb.factorcode.org Git - factor.git/commitdiff
Get rid of 'repeat' experiment
authorslava <slava@factorcode.org>
Thu, 27 Apr 2006 04:44:50 +0000 (04:44 +0000)
committerslava <slava@factorcode.org>
Thu, 27 Apr 2006 04:44:50 +0000 (04:44 +0000)
library/math/math.factor

index c517d6d32e54e82db92c8a5dac60ff77be2fec02..7a8afbfe3234d09ab25e06f2e3caefcf97fb19e2 100644 (file)
@@ -53,25 +53,14 @@ M: object zero? drop f ;
 
 : ceiling ( x -- y ) neg floor neg ; foldable
 
-G: repeat 1 standard-combination ; inline
-
-: (repeat-fixnum) ( i n quot -- )
-    pick pick fixnum>= [
-        3drop
-    ] [
-        [ swap >r call 1 fixnum+fast r> ] keep (repeat-fixnum)
-    ] if ; inline
-
-M: fixnum repeat 0 -rot (repeat-fixnum) ;
-
-: (repeat-bignum) ( i n quot -- )
-    pick pick bignum>= [
+: (repeat) ( i n quot -- )
+    pick pick >= [
         3drop
     ] [
-        [ swap >r call 1 bignum+ r> ] keep (repeat-bignum)
+        [ swap >r call 1+ r> ] keep (repeat)
     ] if ; inline
 
-M: bignum repeat 0 -rot (repeat-bignum) ;
+: repeat 0 -rot (repeat) ; inline
 
 : times ( n quot -- | quot: -- )
     swap [ >r dup slip r> ] repeat drop ; inline