Function: all

all is a byte-compiled function defined in subr.el.gz.

Signature

(all PRED LIST)

Documentation

Non-nil if PRED is true for all elements in LIST.

Other relevant functions are documented in the list group.

View in manual

Probably introduced at or before Emacs version 19.1.

Shortdoc

;; list
(all #'symbolp '(one 2 three))
    => nil
  (all #'symbolp '(one two three))
    => t

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun all (pred list)
  "Non-nil if PRED is true for all elements in LIST."
  (declare (compiler-macro
            (lambda (form)
              (if (not (internal--effect-free-fun-arg-p pred))
                  ;; Don't inline since it would just duplicate the code
                  ;; without allowing any more optimizations.
                  form
                `(not (drop-while ,pred ,list))))))
  (not (drop-while pred list)))