delete-at* ( key assoc -- value/f ? )
Factor handbook » The language » Collections » Associative mapping operations » Storing keys and values in assocs

Next:rename-at ( newkey key assoc -- )


Vocabulary
assocs

Inputs
keya key
assocan assoc


Outputs
value/fthe previous value or f
?a boolean


Word description
Removes an entry from the assoc and outputs the previous value together with a boolean indicating whether it was present.

Side effects
Modifies assoc

See also
delete-at, ?delete-at

Definition


: delete-at* ( key assoc -- value/f ? )
[ at* ] [ delete-at ] 2bi ;