]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/benchmark/beust2/beust2.factor
factor: trim using lists
[factor.git] / extra / benchmark / beust2 / beust2.factor
index 2d37ab48f9a3f0eb02cffb07c231dca88f55b90c..18d78cfb2a2694ce941d8761c66cfcd8a106935b 100644 (file)
@@ -1,12 +1,12 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel locals math math.ranges math.parser sequences ;
+USING: kernel math sequences ;
 IN: benchmark.beust2
 
 ! http://crazybob.org/BeustSequence.java.html
 
 :: (count-numbers) ( remaining first value used max listener: ( -- ) -- ? )
-    10 first - iota [| i |
+    10 first - <iota> [| i |
         i first + :> digit
         digit 2^ :> mask
         i value + :> value'
@@ -28,8 +28,7 @@ IN: benchmark.beust2
     ] any? ; inline recursive
 
 :: count-numbers ( max listener -- )
-    10 iota [ 1 + 1 1 0 max listener (count-numbers) ] any? drop ;
-    inline
+    10 <iota> [ 1 + 1 1 0 max listener (count-numbers) ] any? drop ; inline
 
 :: beust2-benchmark ( -- )
     0 :> i!