]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences: faster interleave.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 12 Mar 2014 19:51:32 +0000 (12:51 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 12 Mar 2014 19:51:32 +0000 (12:51 -0700)
core/sequences/sequences.factor

index 2662c6c7209ace35055b276c15719c5727906738..3c5c8f992b632b25f535cb79bb63df8c9cde8097 100644 (file)
@@ -574,7 +574,7 @@ PRIVATE>
 : interleave ( ... seq between quot: ( ... elt -- ... ) -- ... )
     pick empty? [ 3drop ] [
         [ [ drop first-unsafe ] dip call ]
-        [ [ rest-slice ] 2dip [ bi* ] 2curry each ]
+        [ [ bi* ] 2curry [ 1 ] 2dip (each) (each-integer) ]
         3bi
     ] if ; inline