chickadee » srfi-69 » hash-table-update!

hash-table-update! HASH-TABLE KEY #!optional UPDATE-FUNCTION DEFAULT-VALUE-FUNCTIONprocedure

Sets or replaces the VALUE for KEY in the HASH-TABLE.

The UPDATE-FUNCTION takes the existing VALUE for KEY and returns the new VALUE. The default is identity

The DEFAULT-VALUE-FUNCTION is called when the entry for KEY is missing. The default uses the (hash-table-initial-value), if provided. Otherwise aborts with an exception.

Returns the new VALUE.