Alist validation with cl-every and cl-notany
Heime <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <ONVr5rusIiji0cjgS4RSj_V4KuVFVy_Ma5QkDqWfB3rvSewotg-fz-psi-ia5G4dfoJLyxsS7EjE5VlS6sKVo9IeO4aHiOfUdI520DA6w-0=@protonmail.com> |
Have been looking at cl-every and cl-notany - with the intent to use them to determine whether a list is composed of cons cells (i.e. alist). Basically these two implementations (cl-every #'consp object) (cl-notany (lambda (x) (not (consp x))) object)))) A simpler form for the latter would be (not (cl-notany #'consp object)) They both seem to exit the first time a non-cons is encountered. Thus there is no advantage of one over the other. Am I right?