emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] sequence manipulation functions


From: Stefan Monnier
Subject: Re: [PATCH] sequence manipulation functions
Date: Mon, 10 Nov 2014 21:20:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> I wonder if that's really the more useful behavior, compared to the
>> "inplace" sorting of `sort', or compared to the alternative is always
>> returning a new sequence, but of the same type as the `seq' argument.
> I can make it return a sequence of the same type as seq.

I was really just asking.  But at least it seems that returning the same
type will save people from having to convert the list back to an array
if that's what they were after.

> I don't want to sort in place though, all other functions leave seq
> untouched, and I would like to keep it this way.

I don't like side-effects much myself, so I'm fine with that.

> How do "seq-do" and "seq-map" sound like?

Good.

> I'm not confortable with "seq-doseq" or something like that since I
> would expect it to be a macro similar to "dolist".

A dolist-style macro would also be welcome.  If it could even avoid
calling a function at each iteration, it would be even better.

> Fair enough. One question though, if sequences.el is not preloaded, then
> I guess these functions should not be documented in the manual?

Why not?  Just state that they need a (require 'seq) before you can use them.


        Stefan



reply via email to

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