Handbook
Glossary
?change-of ( ..a assoc key quot: ( ..a value -- ..b newvalue ) -- ..b assoc )
Vocabulary
assocs
.
extras
Inputs
assoc
an
object
key
an
object
quot
a
quotation
with stack effect
( ..a value -- ..b newvalue )
Outputs
assoc
an
object
Definition
USING:
assocs
kernel
;
IN:
assocs.extras
:
?change-of
( ..a assoc key quot: ( ..a value -- ..b newvalue ) -- ..b assoc )
[
set-of
]
compose
[
2dup
?of
]
dip
[
2drop
]
if
;
inline