Closed Ambrevar closed 6 years ago
Oh, I totally missed this PR. I think it'd be much better to recommend the use of the modern seq
library, which was released a couple of years ago and is now part of Emacs.
seq
has, in my opinion, a slightly different use case: it's for manipulating list with predicates (e.g. filtering).
dolist
is more of a control structure for looping: it does not necessarily return a list.
Anyways, we can always mention both.
I mostly mentioned this, because of your second example. Generally I would not have anyone use mapcar
or mapc
at this point (even those in seq they simply have better named aliases).
There is a slight hit because for example seq-do
does not alias to mapc
but instead calls it directly because of the generic implementation. But this is in 99.99% of cases irrelevant and I agree seq-each
makes more sense than mapc
.
Fair enough. Should I adapt the pull request with your suggestions then?
@Ambrevar Please do, thanks!
I've replaced mapc
with seq-do
in all examples.
Thanks! This section can be extract quite a lot, but that's as good start as any.
Update on this?