From ... From: Erik Naggum Subject: Re: [Q] Sorting a Hash Date: 2000/03/09 Message-ID: <3161627464759676@naggum.no>#1/1 X-Deja-AN: 595381285 References: mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 952644761 237 195.0.192.66 (9 Mar 2000 23:32:41 GMT) Organization: Naggum Software; vox: +47 8800 8879; fax: +47 8800 8601; http://www.naggum.no User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 Mime-Version: 1.0 NNTP-Posting-Date: 9 Mar 2000 23:32:41 GMT Newsgroups: comp.lang.lisp * Sandeep Koranne | Is it possible to sort a Hash based on a function on the values? as others have indicated in indirect ways, this is not a well-defined question, since the result of sorting a hash table would have to be something other than a hash table. so we need to know what kind of result you want in order to answer your question. e.g., yes, you can easily _print_ the (key value) pairs of a hash table sorted on the key or on the value, but you would do that by creating an intermediary sequence of keys or whatever, sort on that, and then do the actual printing. #:Erik