assoc-merge ( assoc1 assoc2 quot: ( value1 value2 -- new-value ) -- new-assoc )


Vocabulary
assocs.extras

Inputs
assoc1an object
assoc2an object
quota quotation with stack effect ( value1 value2 -- new-value )


Outputs
new-assocan object


Definition


: assoc-merge
( assoc1 assoc2 quot: ( value1 value2 -- new-value ) -- new-assoc )
pick [ [ clone ] 2dip assoc-merge! ] [ drop nip ] if ;
inline