transcendental-lisp/lisp/list/append.lisp

8 lines
235 B
Common Lisp
Raw Normal View History

2018-03-15 18:30:47 -04:00
(defun my-append (list-one list-two)
(append-tail (reverse list-one) list-two))
(defun append-tail (reversed-list list-two)
(if (null reversed-list) list-two
(recur (rest reversed-list) (cons (car reversed-list) list-two))))