bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33309: Add flatten-list?


From: Alex Branham
Subject: bug#33309: Add flatten-list?
Date: Mon, 10 Dec 2018 14:12:43 -0600
User-agent: mu4e 1.1.0; emacs 27.0.50

Thanks for the feedback, everyone. Here's a patch that implements
`flatten-tree' which always returns a list and recurses into conses. It
also replaces all the existing *-flatten-list functions with obsolete
aliases and replaces usages of them with `flatten-list'.

I added a few very simple tests for this too. CONTRIBUTE doesn't say
whether I should include that change in the git commit message. I left
it out but it's easy to add, just let me know if I should.

> If you do, please use an appropriate name: if it recurses arbitrarily,
> it means it's flattening a *tree* not a *list*.

I aliased `flatten-tree' to `flatten-list' because I think (given the
names of the existing implementations) this is the name people expect,
even if it's not technically right.

I wasn't able to run the tests because some gpg encryption stuff failed.

Thanks,
Alex

Attachment: 0001-New-function-flatten-tree.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]