Answer the question
In order to leave comments, you need to log in
How to name the function?
I have a Common Lisp function that takes two lists (preferably equal) and a function name. Then it applies the resulting function in pairs to all the elements of the lists, and collects the returned values into the resulting list. I can’t imagine what name, capacious and concise will suit her. Here is the function itself:
(defun pair-lists-fun (a-list b-list fun)
(loop for a in a-list
for b in b-list
collect (funcall fun a b)))
Answer the question
In order to leave comments, you need to log in
Sergey Gornostaev (many thanks to him) suggested the mapcar function, which provides much more opportunities. When creating my function, I did not know about that one, but now there is no need for mine. Use mapcar, very convenient.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question