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: Emanuel Berg
Subject: Re: return first element in list with certain property
Date: Tue, 21 Nov 2017 03:18:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

YT wrote:

> It doesn't have to be a problem, it is
> bizarre as it is. Thanks for mentioning it,
> I'll change to `seq-find'.

Not so fast.
O K A Y ...
I t  s e e m s  `seq-find' i s  n o t  i n
E m a c s  b u t  i n  seq-24.el .

However CL is, so shockingly, this is the best
by far - worst-case n, and with all the fixings
available from the get-go!

    (cl-dolist (e test-list)
      (when (> e 1) (cl-return e) ))

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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