[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Including some functions from dash.el in Emacs?
From: |
Stefan Monnier |
Subject: |
Re: Including some functions from dash.el in Emacs? |
Date: |
Wed, 29 Oct 2014 08:50:59 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> think it would be great if Elisp had them builtin, like `flatten`,
> `filter` or `reduce`.
IIUC, `filter' is covered by `cl-remove-if`, and `reduce' is called
`cl-reduce', right?
As for `flatten', all the examples I've seen where it's used have been
either cases where I think that using a different structure would have
made simpler&clearer code (and removed the need for `flatten'), or where
you really really got lucky.
If you think about types, flatten can't make sense for lists (since
lists are typically "lists of <something>" but not "list of list of list
of list of list ..."), so it is only really useful for trees where it
gives you the in-order elements of the tree, so it only works for trees
with no extra meta info. In those tree cases, I believe that
a tree-traversal-iterator would be more useful.
> Would it make sense to include some of the dash.el functions into Emacs?
I'm in the process of trying to get dash.el included in GNU ELPA.
I haven't decided yet whether or when it should go into Emacs or stay
in GNU ELPA.
Stefan
- Including some functions from dash.el in Emacs?, Nicolas Petton, 2014/10/29
- Re: Including some functions from dash.el in Emacs?,
Stefan Monnier <=
- Re: Including some functions from dash.el in Emacs?, Rasmus, 2014/10/29
- Re: Including some functions from dash.el in Emacs?, Nicolas Petton, 2014/10/29
- Re: Including some functions from dash.el in Emacs?, Stefan Monnier, 2014/10/29
- Re: Including some functions from dash.el in Emacs?, Nicolas Petton, 2014/10/29
- Re: Including some functions from dash.el in Emacs?, Stefan Monnier, 2014/10/29
- Re: Including some functions from dash.el in Emacs?, Nicolas Petton, 2014/10/30
- Re: Including some functions from dash.el in Emacs?, Stefan Monnier, 2014/10/31
Re: Including some functions from dash.el in Emacs?, raman, 2014/10/29