Is this gross?
From: Peter Seibel (peter_at_javamonkey.com)
Date: 08/27/04
- Next message: Harald Hanche-Olsen: "Re: Is this gross?"
- Previous message: John Thingstad: "Re: Newbie Question: Why is (if ...) a special operator?"
- Next in thread: Harald Hanche-Olsen: "Re: Is this gross?"
- Reply: Harald Hanche-Olsen: "Re: Is this gross?"
- Reply: Johannes Groedem: "Re: Is this gross?"
- Reply: Kaz Kylheku: "Re: Is this gross?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 27 Aug 2004 20:19:45 GMT
Or an appropriate use of read-time evaluation?
(defun frame-name (id)
(gethash
id
#.(let ((hash (make-hash-table :test #'equal)))
(loop for (ids . name) in
'((("COM" "COMM") . "Comment")
(("TAL" "TALB") . "Album")
(("TCM" "TCOM") . "Composer")
(("TCO" "TCON") . "Genre")
(("TEN" "TENC") . "Encoding program")
(("TP1" "TPE1") . "Artist")
(("TPA" "TPOS") . "Part of set")
(("TRK" "TRCK") . "Track")
(("TT2" "TIT2") . "Song")
(("TYE" "TYER" "TDRC") . "Year"))
do (dolist (id ids) (setf (gethash id hash) name)))
hash)
id))
-Peter
--
Peter Seibel peter@javamonkey.com
Lisp is the red pill. -- John Fraser, comp.lang.lisp
- Next message: Harald Hanche-Olsen: "Re: Is this gross?"
- Previous message: John Thingstad: "Re: Newbie Question: Why is (if ...) a special operator?"
- Next in thread: Harald Hanche-Olsen: "Re: Is this gross?"
- Reply: Harald Hanche-Olsen: "Re: Is this gross?"
- Reply: Johannes Groedem: "Re: Is this gross?"
- Reply: Kaz Kylheku: "Re: Is this gross?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|