In Python there are functions all
and any
they return true if all or some elements of a list are true respectively. Are there equivalent functions in Common Lisp? If not, what is the most succinct and idiomatic way to write them?
Currently i have this:
(defun all (xs)
(reduce (lambda (x y) (and x y)) xs :initial-value t))
(defun any (xs)
(reduce (lambda (x y) (or x y)) xs :initial-value nil))