On Wed 07 Nov 2018 at 14:36, Drew Adams wrote: > FWIW, I don't think Emacs Lisp needs a flatten > function. > > 1. Even Common Lisp doesn't bother with one. > (And there are lots of Common Lisp > functions I'd sooner see added to Emacs.) > > 2. It's trivial to define when needed, and > there are not a lot of existing uses of it. Like I said, there's at least four implementations in Emacs of the same thing, and who knows how many in 3rd-party packages in ELPA or elsewhere. I'm not sure what you consider "a lot," but DRY kicks in around three times for me. > 3. The functions you mention do not all behave > the same. Even their arg lists are not the > same. (But sure, they could all be made to > use a common version, if that were important.) > > 4. (flatten-list 42) => (42) > > The doc string says nothing about the case > where the argument LIST (a bad name here) > is not a list. And if the arg need not be > a list then "-list" in the function name > is not good. Right, I didn't mean to imply that the one I sent be added in its current state. I just meant to kick off discussion. I basically copy/pasted it from somewhere (lpr, I think?). If added it'll need to be properly documented and perhaps message-flatten-list and the others made obsolete aliases. Thanks, Alex