[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: seq-some-p and nil
From: |
Drew Adams |
Subject: |
RE: seq-some-p and nil |
Date: |
Thu, 3 Sep 2015 10:50:28 -0700 (PDT) |
> I think `seq-some-p' (or its successor) would also be more useful if it
> promised to return the first matching element (the docstring says "any
> element", though in practice it does return the first).
Yes, like Common Lisp `some'.
And IMHO, it is better to reserve the suffix `-p' for a function
that does not return an especially useful result, i.e., that
really is used mainly or only as a predicate.
If `seq-some-p' returns a sequence element then it should be
called `seq-some', without the `-p'.
The fact that some functions that return useful non-nil results
other than `t' can be used also as predicates does not mean
that they should systematically be named with suffix `-p'.
That suffix draws attention to the use as a predicate. A case
such as `some-p' should not do that. Its name should say that
it returns a sequence element.
- seq-some-p and nil, Simen Heggestøyl, 2015/09/03
- Re: seq-some-p and nil, Stefan Monnier, 2015/09/03
- Re: seq-some-p and nil, Artur Malabarba, 2015/09/03
- Re: seq-some-p and nil, Nicolas Petton, 2015/09/03
- Re: seq-some-p and nil, Mark Oteiza, 2015/09/05
- Re: seq-some-p and nil, Nicolas Petton, 2015/09/06
- Re: seq-some-p and nil, Stefan Monnier, 2015/09/06
- Re: seq-some-p and nil, Nicolas Petton, 2015/09/07
- RE: seq-some-p and nil, Drew Adams, 2015/09/07
- Re: seq-some-p and nil, Stefan Monnier, 2015/09/07
- Re: seq-some-p and nil, Mark Oteiza, 2015/09/07
- RE: seq-some-p and nil, Drew Adams, 2015/09/07