]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences: adding nths-unsafe.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 6 Apr 2013 21:20:32 +0000 (14:20 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 6 Apr 2013 21:29:47 +0000 (14:29 -0700)
core/sequences/sequences.factor

index e496e55c244025f8029bbd0e7a4d17d6a4c2887d..1d3b12fa75768a5ddc85574aa6688ba6f93ace5f 100644 (file)
@@ -599,6 +599,13 @@ PRIVATE>
     swap V{ } clone
     [ [ (indices) ] 2curry each-index ] keep ;
 
+<PRIVATE
+
+: nths-unsafe ( indices seq -- seq' )
+    [ [ nth-unsafe ] curry ] keep map-as ;
+
+PRIVATE>
+
 : nths ( indices seq -- seq' )
     [ [ nth ] curry ] keep map-as ;