From 39073a08c50017639af346069c4e9710bd40b93e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Sun, 23 Jun 2013 15:25:14 +0200 Subject: [PATCH] Fix MAPC --- src/list.lisp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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))) -- 1.7.10.4