[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Would seq-range and seq-mapcat be useful?
From: |
Oleh Krehel |
Subject: |
Re: Would seq-range and seq-mapcat be useful? |
Date: |
Mon, 02 Feb 2015 19:39:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Mark Oteiza <address@hidden> writes:
> Nicolas Petton <address@hidden> writes:
>> Oleh Krehel <address@hidden> writes:
>>> I like `seq-group-by`.
>>>
>>> I'm not sure about `seq-mapcat`, since there is `cl-mapcan` (although
>>> it's destructive), I guess `seq-mapcat` would be fine.
>>>
>>> And I would prefer the name `seq-partition` instead of `seq-slice`,
>>> since `partition' is a Clojure name with same effect, and slice means
>>> something different in Python.
>>
>> Yes, I felt the same.
>
> Makes sense. Array slicing seems to be just taking a subsequence in a
> lot of languages. Perhaps aliasing seq-slice to seq-subseq would be
> good to do.
The bad thing about aliases is that you have to remember both, so
they're not helping at all. There will always be person A using alias A
and person B using alias B. Both of them will have trouble to read each
others code.
This is why e.g. Python is so determined to have only way of doing
things.
Oleh