[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33309: Add flatten-list?
From: |
Stefan Monnier |
Subject: |
bug#33309: Add flatten-list? |
Date: |
Mon, 10 Dec 2018 12:49:03 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> For the records, in Tramp I need also this function. I'm just going to
> define it myself (derived from eshell-flatten-list), but I'll happily
> switch to a common flatten-list.
If you do, please use an appropriate name: if it recurses arbitrarily, it
means it's flattening a *tree* not a *list*. IOW if we want to provide
`list-flatten` (or `seq-flatten`) it would have to look a bit like
(apply #'append list)
without the recursion.
> Unless nobody else objects, I'd like to encourage you to prepare a patch
> to be added to the master branch. This could include the replacement of
> the existing implementations.
Agreed. Just make sure the name clarifies it's working on a tree
(e.g. depending on how you define the function, it can be considered as
a function that returns all the leaves of a given tree).
Stefan
- bug#33309: Add flatten-list?, Michael Albinus, 2018/12/10
- bug#33309: Add flatten-list?,
Stefan Monnier <=
- bug#33309: Add flatten-list?, Basil L. Contovounesios, 2018/12/10
- bug#33309: Add flatten-list?, Alex Branham, 2018/12/10
- bug#33309: Add flatten-list?, Basil L. Contovounesios, 2018/12/10
- bug#33309: Add flatten-list?, Stephen Berman, 2018/12/10
- bug#33309: Add flatten-list?, Michael Albinus, 2018/12/11
- bug#33309: Add flatten-list?, martin rudalics, 2018/12/11