 M: byte-array apply-merge-keys nip ;
 M: string apply-merge-keys nip ;
 M: assoc apply-merge-keys
-    [ [ ?apply-merge-keys ] bi-curry@ bi ] with2 assoc-map!
+    [ [ ?apply-merge-keys ] bi-curry@ bi ] withd assoc-map!
     merge get [ ?apply-merge-key ] when
     value get [ ?apply-default-key ] when ;
 

    [ assoc-map ] [ drop clear-assoc ] [ drop swap assoc-union! ] 2tri ; inline

M: assoc (deref-aliases)
     [ [ (deref-aliases) ] bi-curry@ bi ] with2 assoc-map! ;

: merge-values ( seq -- assoc )
    reverse [ ] [ assoc-union ] map-reduce ;

    [
        [ emit-mapping-key ]
        [ emit-object ] bi-curry* 2bi
    ] withd withd assoc-each ;

: emit-linked-assoc-body ( emitter event linked-assoc -- )
    >alist [ first2 swap associate ] map emit-sequence-body ;
