sequences: length-operator-last is not good, remove it
authorDoug Coleman <doug.coleman@gmail.com>
Wed, 17 Aug 2022 03:02:05 +0000 (22:02 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Wed, 17 Aug 2022 03:02:05 +0000 (22:02 -0500)
core/sequences/sequences.factor

index 3d22801ef4a6d07ecab8ef9e23238d6de7c577aa..91fc75e51826114b6e507a033fa6cbd97af82e54 100644 (file)
@@ -420,9 +420,6 @@ PRIVATE>
 : length-operator ( seq quot -- n quot' )
     [ length-iterator ] dip compose ; inline
 
-: length-operator-last ( seq quot -- n quot' )
-    length-operator [ 1 - ] dip ; inline
-
 : collect-into ( quot into -- quot' )
     [ [ keep ] dip set-nth-unsafe ] 2curry ; inline
 
@@ -562,7 +559,7 @@ PRIVATE>
     index/element ; inline
 
 : find-last-from-unsafe ( ... n seq quot: ( ... elt -- ... ? ) -- ... i elt )
-    [ length-operator-last nip find-last-integer ] keepd
+    [ length-operator nip find-last-integer ] keepd
     index/element ; inline
 
 PRIVATE>