(> (length list) 0) = (plusp (length list)) = list so cond list is better than cond > length list 0 etc. Try to reduce to O(1) instead of O(n) also (cond ((not (endp list)) …)