help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: return first element in list with certain property


From: Michael Heerdegen
Subject: Re: return first element in list with certain property
Date: Mon, 20 Nov 2017 20:21:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

John Mastro <address@hidden> writes:

> >> cl-find-if
> >
> > That's it 100%
>
> Or, if seq.el is more your style:
>
> (seq-find (lambda (e) (> e 1)) '(1 1 3 1 4 2))
> ;=> 3

And if you want to be cool:

(seq-find (apply-partially #'< 1) '(1 1 3 1 4 2))
==> 3


Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]