This is my old blog. My new ones are herdrick.tumblr.com or herdrick.posterous.com

Thursday, February 08, 2007

Fever's break

Upon emerging from the worst of my head-cold chest-cold fever, I realized: association lists work fine for any arbitrary key/value pairs. A very obvious thing I suppose, but something had been throwing me off when I was thinking of alists this morning. When you cons the key onto the value, but the value is a list, then the resulting alist entry isn't a dotted pair, it's just a plain old list. But who cares? Functionally it's identical. It may as well be a dotted pair. Look:

(a . (1 2 3))
(a 1 2 3))

Are the car and cdr of this any different? No.

Obvious, yes, but I had a fever! I was lucky to be thinking at all. Get off my case!

0 comments: