Here's what I have so far:
(defun append-all(x L)
(if (null L)
L
(cons (append (car L) x) (append-all x (cdr L))))
)
)
Output:
(append-all '3 '((1) (2 1) (2)))
((1 . 3) (2 1 . 3) (2 . 3))
Want:
((1 3) (2 1 3) (2 3))
This is a helper function, so the fact that it is a linked list seems to be causing me problems.
Thanks
edit: fixed recursive call