Handbook
Glossary
assoc-merge! ( assoc1 assoc2 quot: ( value1 value2 -- new-value ) -- assoc1' )
Vocabulary
assocs
.
extras
Inputs
assoc1
an
object
assoc2
an
object
quot
a
quotation
with stack effect
( value1 value2 -- new-value )
Outputs
assoc1'
an
object
Definition
USING:
assocs
kernel
locals.backend
;
IN:
assocs.extras
:
assoc-merge!
( assoc1 assoc2 quot: ( value1 value2 -- new-value ) -- assoc1' )
[
3
load-locals
-1
get-local
-2
get-local
pick
at*
0
get-local
[
load-local
swap
0
get-local
call
1
drop-locals
]
curry
[
drop
]
if
-2
get-local
pick
set-at
3
drop-locals
]
curry
assoc-each
;
inline