Handbook
Glossary
set-at-once ( value key assoc -- )
Vocabulary
biassocs
Inputs
value
an
object
key
an
object
assoc
an
assoc
Outputs
None
Word description
If the assoc does not contain the given key, adds the key/value pair to the assoc, otherwise does nothing.
Definition
USING:
assocs
kernel
;
IN:
biassocs
:
set-at-once
( value key assoc -- )
[
key?
]
2check
[
3drop
]
[
set-at
]
if
;