GNU bug report logs -
#57548
Add new function `seq-positions'
Previous Next
Reported by: Damien Cassou <damien <at> cassou.me>
Date: Fri, 2 Sep 2022 18:50:02 UTC
Severity: normal
Tags: patch
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 57548 <at> debbugs.gnu.org (full text, mbox):
Damien Cassou <damien <at> cassou.me> writes:
> Indeed, such a function would certainly make sense. I would refrain
> from calling it `seq-positions` though because there is already a
> `seq-position` function that is very similar. I guess the function you
> suggest wouldn't take an element as argument either. In any case, I
> think the current function makes sense on its own and what you are
> asking for is a new function that seems out of scope of this current
> patch. If you give me a name (what about `(seq-matching-positions seq
> pred)`?), I volunteer to send a new patch in a new mail thread.
No - I actually mean (and, sorry, I see that my initial response said
something slightly different): calling the function with ELT == 10 and
TESTFN == #'>= would return all positions in the SEQUENCE of elements
not less than 10.
We don't need another function. You only need to say that TESTFN is not
necessarily an equality predicate or symmetric. And in which order the
two arguments are passed (and have a look that your current calling order
is so that the above example works as expected).
Michael.
This bug report was last modified 2 years and 317 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.