Chapter 2 Code: combine-all
LintonNaik opened this issue · comments
Hi,
I'm not great with GitHub so I'm not sure if I'm using it right. Basically if you look at the full text of chapter 2 you'll see there's a definition there for combined-all, repeated below:
(defun combine-all (xlist ylist)
"Return a list of lists formed by appending a y to an x.
E.g., (combine-all '((a) (b)) '((1) (2)))
-> ((A 1) (B 1) (A 2) (B 2))."
(mappend #'(lambda (y)
(mapcar #'(lambda (x) (append . y)) xlist))
ylist))
Note that the append does not refer to x as it should. This error does not appear in the .lisp file collation of the code from this chapter.
Ah, the error wasn't in the cleaner source, from Safari; it was in the original, OCR'ed version, and I brought it in when I salvaged earlier work.
Copying the code from simple.lisp
fixed this.