]> code.delx.au - gnu-emacs/commit
Add seq-find
authorNicolas Petton <nicolas@petton.fr>
Thu, 10 Sep 2015 21:49:56 +0000 (23:49 +0200)
committerNicolas Petton <nicolas@petton.fr>
Thu, 10 Sep 2015 22:09:35 +0000 (00:09 +0200)
commit8aa0386420f9d982b99568f27a5953dfc737640e
treece356f3c18830d4020f3231957020074383cd7ef
parent5a92d97802e095c541a644bdaca00755942af821
Add seq-find

This function is similar to `seq-some' but returns the found element.
In the cases where nil can be the found element, a sentinel optional
argument can be provided to avoid ambiguities.

* lisp/emacs-lisp/seq.el (seq-find): New function.
* test/automated/seq-tests.el (test-seq-find): Add tests for `seq-find'.
* doc/lispref/sequences.texi (Sequence Functions): Add documentation for
seq-find.
doc/lispref/sequences.texi
lisp/emacs-lisp/seq.el
test/automated/seq-tests.el