]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences: make nth3-unsafe simpler.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 5 Sep 2012 17:52:44 +0000 (10:52 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 5 Sep 2012 17:52:44 +0000 (10:52 -0700)
core/sequences/sequences.factor

index 818adc72852a6e160b6baf78a22f1a2847bf81f8..bd01a3bf79cd4c98624331ad9101c5000ecdc488 100644 (file)
@@ -865,10 +865,7 @@ PRIVATE>
     [ nth-unsafe ] [ [ 1 + ] dip nth-unsafe ] 2bi ; inline
 
 : nth3-unsafe ( n seq -- a b c )
-    [ nth-unsafe ]
-    [ [ 1 + ] dip nth-unsafe ]
-    [ [ 2 + ] dip nth-unsafe ]
-    2tri ; inline
+    [ nth2-unsafe ] [ [ 2 + ] dip nth-unsafe ] 2bi ; inline
 
 : (binary-reduce) ( ... seq start quot: ( ... elt1 elt2 -- ... newelt ) from to -- ... value )
     #! We can't use case here since combinators depends on