 
 : map-reduce ( ..a seq map-quot: ( ..a elt -- ..b intermediate ) reduce-quot: ( ..b prev intermediate -- ..a next ) -- ..a result )
     [ [ dup first ] dip [ call ] keep ] dip compose
-    swapd [ 1 ] 2dip (each) (each-integer) ; inline
+    swapd 1 each-from ; inline
 
 : 2map-reduce ( ..a seq1 seq2 map-quot: ( ..a elt1 elt2 -- ..b intermediate ) reduce-quot: ( ..b prev intermediate -- ..a next ) -- ..a result )
     [ [ 2dup [ first ] bi@ ] dip [ call ] keep ] dip compose
-    [ -rot ] dip [ 1 ] 3dip (2each) (each-integer) ; inline
+    [ -rot ] dip 1 2each-from ; inline
 
 <PRIVATE
 


: cartesian-product ( seq1 seq2 -- newseq )
    [ { } 2sequence ] cartesian-map ;

: each-from ( ... seq quot: ( ... x -- ... ) i -- ... )
    -rot (each) (each-integer) ; inline

<PRIVATE


: each ( ... seq quot: ( ... x -- ... ) -- ... )
    (each) each-integer ; inline

: each-from ( ... seq quot: ( ... x -- ... ) i -- ... )
    -rot (each) (each-integer) ; inline

: reduce ( ... seq identity quot: ( ... prev elt -- ... next ) -- ... result )
    swapd each ; inline

