From: David Vázquez Date: Sun, 23 Jun 2013 13:25:14 +0000 (+0200) Subject: Fix MAPC X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=39073a08c50017639af346069c4e9710bd40b93e;p=jscl.git Fix MAPC --- diff --git a/src/list.lisp b/src/list.lisp index ad0e7a6..9b5f9c1 100644 --- a/src/list.lisp +++ b/src/list.lisp @@ -213,9 +213,10 @@ (collect (apply func elems)))))))) (defun mapc (func &rest lists) - (do* ((elems (map1 #'car lists) (map1 #'car lists-rest)) - (lists-rest (map1 #'cdr lists) (map1 #'cdr lists-rest))) - ((dolist (x elems) (when (null x) (return t))) + (do* ((tails lists (map1 #'cdr tails)) + (elems (map1 #'car tails) + (map1 #'car tails))) + ((dolist (x tails) (when (null x) (return t))) (car lists)) (apply func elems)))