change-at ( ..a key assoc quot: ( ..a value -- ..b newvalue ) -- ..b )
Factor handbook » The language » Collections » Associative mapping operations » Storing keys and values in assocs

Prev:rename-at ( newkey key assoc -- )
Next:at+ ( n key assoc -- )


Vocabulary
assocs

Inputs
keyan object
assocan assoc
quota quotation with stack effect ( ..a value -- ..b newvalue )


Outputs
None

Word description
Applies the quotation to the value associated with key, storing the new value back in the assoc.

Side effects
Modifies assoc

See also
?change-at, change-nth, change

Definition


: change-at
( ..a key assoc quot: ( ..a value -- ..b newvalue ) -- ..b )
[ [ at ] dip call ] [ drop ] 3bi set-at ; inline