From ... From: Erik Naggum Subject: Re: Elegant solution asked Date: 1997/03/05 Message-ID: <3066591221451362@naggum.no>#1/1 X-Deja-AN: 223372795 References: <331DF5AD.128B@wrq.com> mail-copies-to: never Organization: Naggum Software; +47 2295 0313; http://www.naggum.no Newsgroups: comp.lang.lisp * marisal@wrq.com | Very often I need a function to map a 2 argument function over a list and | a fixed argument. For example, if we call such function map1: | (map1 #'list 'z '(a b c)) should return: '((z a) (z b) (z c)) recently, I had the same need, and used a circular list like this: (defun repeatingly (&rest args) (let ((list (copy-list args))) (nconc list list))) (mapcar #'list (repeatingly 'z) '(a b c)) => ((z a) (z b) (z c)) this was modeled after the `constantly' function, but I don't know how good style this is. #\Erik -- if you think big enough, you never have to do it