Subject: Re: Some advice for a lisp newb
From: rpw3@rpw3.org (Rob Warnock)
Date: Tue, 16 Mar 2004 10:47:27 -0600
Newsgroups: comp.lang.lisp
Message-ID: <HpScnUU6SdICssrd3czS-g@speakeasy.net>
Christopher Browne  <cbbrowne@acm.org> wrote:
+---------------
| Consider the following setf...
| (setf raw-variable 3.141
|       (cdr somelist) 23
|       (gethash key *hashtable*) 171
|       ... )
| 
| Allowing assigning values to 'places' is one of the really clever
| things that Common Lisp does; it's not all that hard to grasp, but it
| takes a while to figure out just how useful it is :-).
+---------------

The idiom that recently won my vote for the "Wow! *Just* what I needed!"
award was:

	(incf (gethash key *hashtable* 0))

I have yet to see a neater way to look for duplicates or build histograms...


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607