 
 <PRIVATE
 
-! slow-each versions don't unslice
-
-: setup-slow-each ( seq -- n quot )
-    [ length check-length ] keep [ nth-unsafe ] curry ; inline
-
-: (slow-each) ( seq quot -- n quot' )
-    [ setup-slow-each ] dip compose ; inline
-
-: (slow-each-index) ( seq quot -- n quot' )
-    [ setup-slow-each [ keep ] curry ] dip compose ; inline
-
 : setup-each ( seq -- i n quot )
     dup slice? [
         [ from>> ] [ to>> ] [ seq>> ] tri

    if ; inline

: (find-index) ( seq quot quot' -- i elt )
    pick [ [ (slow-each-index) ] dip call ] dip finish-find ; inline

: (find-index-from) ( n seq quot quot' -- i elt )
    [ 2dup bounds-check? ] 2dip

: collect ( n quot into -- )
    (collect) each-integer ; inline

: setup-map-each ( seq -- n quot )
    [ length check-length ] keep [ nth-unsafe ] curry ; inline

: (map-each) ( seq quot -- n quot' )
    [ setup-map-each ] dip compose ; inline

: (map-each-index) ( seq quot -- n quot' )
    [ setup-map-each [ keep ] curry ] dip compose ; inline

: map-into ( seq quot into -- )
    [ (map-each) ] dip collect ; inline

: 2nth-unsafe ( n seq1 seq2 -- elt1 elt2 )
    [ nth-unsafe ] bi-curry@ bi ; inline
