]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences: s/bounds-check-find/bounds-check-call/ and private
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 1 Aug 2022 02:22:14 +0000 (19:22 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 1 Aug 2022 02:22:14 +0000 (19:22 -0700)
core/sequences/sequences.factor
extra/sequences/extras/extras.factor

index c0dac19c274a14933045c3b0cf8bd16901e9baf3..b70ffec32bcc019dfa2dd21252649499e689905f 100644 (file)
@@ -549,11 +549,11 @@ PRIVATE>
 : 3map ( ... seq1 seq2 seq3 quot: ( ... elt1 elt2 elt3 -- ... newelt ) -- ... newseq )
     pickd swap 3map-as ; inline
 
-: bounds-check-find ( n seq quot -- elt i )
-    2over bounds-check? [ call ] [ 3drop f f ] if ; inline
-
 <PRIVATE
 
+: bounds-check-call ( n seq quot -- elt i )
+    2over bounds-check? [ call ] [ 3drop f f ] if ; inline
+
 : find-from-unsafe ( ... n seq quot: ( ... elt -- ... ? ) -- ... i elt )
     [ rot sequence-operator-from find-integer-from ] keepd
     index/element ; inline
@@ -565,13 +565,13 @@ PRIVATE>
 PRIVATE>
 
 : find-from ( ... n seq quot: ( ... elt -- ... ? ) -- ... i elt )
-    '[ _ find-from-unsafe ] bounds-check-find ; inline
+    '[ _ find-from-unsafe ] bounds-check-call ; inline
 
 : find ( ... seq quot: ( ... elt -- ... ? ) -- ... i elt )
     [ 0 ] 2dip find-from-unsafe ; inline
 
 : find-last-from ( ... n seq quot: ( ... elt -- ... ? ) -- ... i elt )
-    '[ _ find-last-from-unsafe ] bounds-check-find ; inline
+    '[ _ find-last-from-unsafe ] bounds-check-call ; inline
 
 : find-last ( ... seq quot: ( ... elt -- ... ? ) -- ... i elt )
     [ index-of-last ] dip find-last-from ; inline
@@ -580,7 +580,7 @@ PRIVATE>
     '[
         _ [ sequence-index-operator find-integer-from ] keepd
         index/element
-    ] bounds-check-find ; inline
+    ] bounds-check-call ; inline
 
 : find-index ( ... seq quot: ( ... elt i -- ... ? ) -- ... i elt )
     [ 0 ] 2dip find-index-from ; inline
index 7c6bc05d0cef5e0b543f0129d5a9b601662e1407..1cc541f163e751507503760c400199994c707f18 100644 (file)
@@ -652,7 +652,7 @@ PRIVATE>
     '[
         _ [ sequence-index-operator-last find-last-integer ] keepd
         index/element
-    ] bounds-check-find ; inline
+    ] bounds-check-call ; inline
 
 : find-last-index ( ... seq quot: ( ... elt i -- ... ? ) -- ... i elt )
     [ index-of-last ] dip find-last-index-from ; inline