maybe-set-at ( value key assoc -- changed? )


Vocabulary
assocs

Inputs
valuean object
keyan object
assocan object


Outputs
changed?an object


Definition


: maybe-set-at ( value key assoc -- changed? )
3dup at*
[ = [ 3drop f ] [ set-at t ] if ] [ 2drop set-at t ] if ;