(defun ota(c d)(if (null c) (list d)
(if (=(list-length c)1)(list (append (car c)(list (car d))))
(cons (append (car c) (list (car d)))
(ota (cdr c) d)) )))
(defun m(c d) (if (=(list-length d)1)(ota c d)
(append (m c (list (car d))) (m c (cdr d)))))
(defun gen(a n) (if(= n 0) nil (if(= n 1)(list (list (car a)) (cdr a) )
(m (gen a (1- n))a))))
Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests