 
 
 : input>mapping-cursor ( input-cursor -- mapping-cursor )
-    >input-cursor dup input>output-cursor <mapping-cursor> ;
+    >input-cursor [ input>output-cursor ] keep <mapping-cursor> ;
 
 
 : (find2) ( cursor quot: ( cursor obj -- ? ) -- cursor/f elt/f ? )


: (map2) ( cursor quot: ( cursor obj -- obj' ) -- out )
    over input>> cursor-at [
        [ swap call ] 3keep drop
        [ [ cursor-put ] change-output [ cursor-inc-input ] change-input ] dip (map2)
    ] [
        2drop output>>
    ] if ; inline recursive

: map2 ( obj quot -- obj' )
    [ input>mapping-cursor ] dip (map2) ; inline

TUPLE: sequence-output-cursor < cursor seq n ;
CONSTRUCTOR: <sequence-output-cursor> sequence-output-cursor ( seq n -- obj ) ;

TUPLE: mapping-cursor < cursor output input ;
CONSTRUCTOR: <mapping-cursor> mapping-cursor ( output input -- obj ) ;

TUPLE: alist-cusor < cursor alist n ;

