(defun even-only (L) (cond ((null L) nil) ((evenp (car L)) (cons (car L) (even-only (cdr L)))) (t ; otherwise (even-only (cdr L))) ) ) if list is < 2 check if the car of the list is 3 If so return item after 3 in list else Return nil Recursively call follow with the cdr of the list. If return value from call to follow is a number add to list and return (defun follow (x lst) (cond ((= (length lst) 2) (cond ; <--- this is not needed (t (and (eql (car lst) x) (numberp (car(cdr lst))))t) ; why this numberp? (nil) )) ((< (length lst) 2)nil) ((follow (x (cdr lst)))(setq final (cons (car(cdr lst)) final))) ; you don't need setq etc ; also its (follow x ...), not (follow (x ...)) ) ) (defun follow (x lst) (cond ((= (length lst) 2) ; base case (cond ((eql (car lst) x) (list (car (cdr lst)))) ; if first elt is x ; return second elt (t nil) ; otherwise, return nil ) ) ((eql (car lst) x) (car (cdr lst)) ; if first elt is x (cons (car (cdr lst)) (follow x (cdr lst))) ) (t (follow x (cdr lst))) ) ) (defun follow (x lst) (cond ((= (length lst) 2) ; base case (cond ((eql (car lst) x) ; if first elt is x ) ; return second elt (t nil) ; otherwise, return nil ) ) ( ; else if first elt is x ; return cons of 2nd element and rec call ) (t ; otherwise ; recursive call ) ) )