From ... From: Erik Naggum Subject: Re: Functional programming Date: 1999/11/10 Message-ID: <3151187105895499@naggum.no>#1/1 X-Deja-AN: 546702523 References: <941894743.991192@lxms.cit.org.by> <941902054.108718@lxms.cit.org.by> <3150898143617424@naggum.no> <87k8nrmzhu.fsf@nightfly.apk.net> <382872E3.CA955070@cit.org.by> mail-copies-to: never X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 942198308 14032 193.71.66.49 (10 Nov 1999 01:45:08 GMT) Organization: Naggum Software; +47 8800 8879 or +1 510 435 8604; fax: +47 2210 9077; http://www.naggum.no NNTP-Posting-Date: 10 Nov 1999 01:45:08 GMT Newsgroups: comp.lang.lisp * Tord Kallqvist Romstad | This works, of course, but I thought matt meant that all the functions in | list-of-functions should be used on the same argument (in his example, a | news article). Having to construct a list of copies of this single | argument of the same length as the list of functions seems very | inconvenient. it would indeed, so we don't. given this very useful function: (defun circular-list (arg &rest args) (let ((car (list arg))) (nconc car args car))) for a single argument, the answer is simply this: (mapcar #'funcall (circular-list )) for a list of arguments, it gets just a _little_ hairier: (apply #'mapcar #'funcall (mapcar #'circular-list )) but it's OK to be a little afraid of this code until you figure it out. #:Erik :) -- Attention Microsoft Shoppers! MS Monopoly Money 6.0 are now worthless.