Handbook
Glossary
push-at ( value key assoc -- )
Vocabulary
assocs
Inputs
value
an
object
key
an
object
assoc
an
assoc
Outputs
None
Word description
Pushes the
value
onto a
vector
stored at the
key
in the
assoc
. If the
key
does not yet exist, creates a new
vector
at that
key
and pushes the
value
.
Examples
USING: prettyprint assocs kernel ; H{ { "cats" V{ "Mittens" } } } "Mew" "cats" pick push-at .
H{ { "cats" V{ "Mittens" "Mew" } } }
Definition
USING:
vectors
;
IN:
assocs
:
push-at
( value key assoc -- )
[
?push
]
change-at
;