Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!zaphod.mps.ohio-state.edu!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.lang.lisp Subject: Re: Accumlating maphash results Message-ID: <1991May15.165524.17290@Think.COM> Date: 15 May 91 16:55:24 GMT References: <1991May15.153918.23823@m.cs.uiuc.edu> Sender: news@Think.COM Reply-To: barmar@think.com Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 19 In article <1991May15.153918.23823@m.cs.uiuc.edu> carroll@cs.uiuc.edu (Alan M. Carroll) writes: >(let ((results nil)) > (maphash #'(lambda (s o) (push (func o) results)) table) > results) >However, this seems kludgy to me. Is there a cleaner way? Thanks! Nope, that's a good way. If you have an ANSI/CLtL2 LOOP implementation you can also use (loop for o being the hash-values of table collect o) However, this isn't currently as portable as the MAPHASH version, since not all CL implementation implement all the new LOOP features. -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar