[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hash-table-update!
- To: srfi-69@xxxxxxxxxxxxxxxxx
- Subject: hash-table-update!
- From: felix winkelmann <bunny351@xxxxxxxxx>
- Date: Tue, 26 Apr 2005 07:28:43 +0200
- Delivered-to: srfi-69@xxxxxxxxxxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=JJ7InO4peoI8nF5NLpritHGu42JFQ1LM97/7ZViwyfxQTEmqBxWtP3EEty0tlmAWTa6ogy/agkiQoVV8wgCfdyLwr41ipegq8nqyd/kCHR5GwFryUAxlA8Qbp+mDruUa8Ni04AO/WPwk4uRejLxi6NHDBXpVlgnNrCqr79mjXv8=
- Reply-to: felix winkelmann <bunny351@xxxxxxxxx>
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