1
2
3
(defun check (list)
  (loop for (x . xs) on list always
    (or (every (lambda (y) (< x y)) xs) (every (lambda (y) (> x y)) xs))))