Email list hosting service & mailing list manager


hash-table-update! felix winkelmann 26 Apr 2005 05:28 UTC

Hi!

Several Scheme implementations provide an "update" function, i.e.

(hash-table-update! TABLE KEY PROC [DEFAULT])

which looks up the entry and (if found) calls PROC and replaces
the entry with the result. This might be more efficient than

(hash-table-set! TABLE KEY (PROC (hash-table-ref TABLE KEY)))

cheers,
felix