Handbook
Glossary
assoc-union! ( assoc1 assoc2 -- assoc1 )
Factor handbook
»
The language
»
Collections
»
Associative mapping operations
»
Set-theoretic operations on assocs
Prev:
extract-keys ( seq assoc -- subassoc )
Next:
assoc-diff! ( assoc1 assoc2 -- assoc1 )
Vocabulary
assocs
Inputs
assoc1
an
assoc
assoc2
an
assoc
Outputs
assoc1
an
assoc
Word description
Adds all entries from
assoc2
to
assoc1
.
Side effects
Modifies
assoc1
Definition
USING:
kernel
;
IN:
assocs
:
assoc-union!
( assoc1 assoc2 -- assoc1 )
over
[
[
swap
]
]
dip
[
set-at
]
curry
compose
assoc-each
;
inline