 
 : nall- ( seqs... quot n -- begin end quot ) swap [ nall ] dip ; inline
 
-MACRO: -ncontainer- ( n -- )
-    1 - [ -unzip- ] n*quot [ -container- ] prepend ;
-
-: ncontainer- ( seqs... quot n -- begin end quot ) [ nall- ] [ -ncontainer- ] bi ; inline
-
-: neach ( seqs... quot n -- ) ncontainer- -each ; inline
+MACRO: -nin- ( n -- )
+    1 - [ -unzip- ] n*quot [ -in- ] prepend ;
+
+: nin- ( seqs... quot n -- begin end quot ) [ nall- ] [ -nin- ] bi ; inline
+
+: neach ( seqs... quot n -- ) nin- -each ; inline
 : nmap-as ( seqs... quot exemplar n -- newseq )
-    swap [ ncontainer- ] dip -map-as ; inline
+    swap [ nin- ] dip -map-as ; inline
 : nmap ( seqs... quot n -- newseq )
     dup [ npick ] curry [ dip swap ] curry dip nmap-as ; inline
 

: 2all- ( a b quot -- begin end quot )
    [ 2all ] dip ; inline

ALIAS: -2container- -assoc-

: 2container- ( a b quot -- begin end quot' )
    2all- -2container- ; inline

: 2each ( ... a b quot: ( ... x y -- ... ) -- ... )
    2container- -each ; inline

: 2map-as ( ... a b quot: ( ... x y -- ... z ) exemplar -- ... c )
    [ 2container- ] dip -map-as ; inline

: 2map ( ... a b quot: ( ... x y -- ... z ) -- ... c )
    pick 2map-as ; inline 

M: sequence-cursor set-cursor-value [ n>> ] [ seq>> ] bi set-nth ; inline

!
! map cursor
!

TUPLE: map-cursor
    { from read-only }
    { to read-only } ;
C: <map-cursor> map-cursor

INSTANCE: map-cursor forward-cursor

M: map-cursor cursor-compatible? [ from>> ] bi@ cursor-compatible? ; inline
M: map-cursor cursor-valid? [ from>> ] [ to>> ] bi [ cursor-valid? ] both? ; inline
M: map-cursor cursor= [ from>> ] bi@ cursor= ; inline
M: map-cursor inc-cursor [ from>> inc-cursor ] [ to>> inc-cursor ] bi <map-cursor> ; inline

INSTANCE: map-cursor output-cursor

M: map-cursor set-cursor-value-unsafe to>> set-cursor-value-unsafe ; inline
M: map-cursor set-cursor-value        to>> set-cursor-value        ; inline

: -map- ( begin end quot to -- begin' end' quot' )
    swap [ '[ _ <map-cursor> ] bi@ ] dip '[ from>> @ ] ; inline

: -map ( begin end quot to -- begin' end' quot' )
    -map- -out ; inline

!
! pusher cursor
