emacs-lisp-style-guide
emacs-lisp-style-guide copied to clipboard
Consistency between seq-do, seq-map, mapc, and mapcar
Use seq-do or dolist instead of mapcar if you don’t intend to concatenate the result.
Hi! I'm curious about the wording of this guideline. Suggesting dolist makes sense to me, but:
-
Why
seq-doovermapc?seqisn't immediately available without loadingseq, butmapcis. -
If it's because
seq-dois more generic, why offermapcaras an alternative instead of the similarly genericseq-map?
Thanks for your time!
Why seq-do over mapc? seq isn't immediately available without loading seq, but mapc is.
It makes sense if you're already using seq.el for consistency's sake. I guess we can improve the wording there. Many guidelines can benefit from this. :-)