Vocabulary
assocs

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


Outputs
None

Word description
If the key exists in the assoc, 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 )
2over [ set-at ] 2curry compose [ at* ] dip [ drop ] if ;
inline