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

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

Re: How to flatten a one-level-deep list?


From: Marcin Borkowski
Subject: Re: How to flatten a one-level-deep list?
Date: Fri, 20 May 2016 19:20:32 +0200
User-agent: mu4e 0.9.16; emacs 25.1.50.1

On 2016-05-20, at 17:01, Michael Heerdegen <michael_heerdegen@web.de> wrote:

> How would you call the proposed functionality then?
>
> I'm asking because I incidentally need a name for the analog stream
> operation I want to add to stream.el:
>
> #+begin_src emacs-lisp
> (defun stream-??? (stream-of-streams)
>   "Concatenate all streams in STREAM-OF-STREAMS an return the result.
> All elements in STREAM-OF-STREAMS must be streams.  The result is
> always a stream."
>   (stream-reduce #'stream-append (stream-empty) stream-of-streams))
> #+end_src

Concatenate? ;-)

> Thanks,
>
> Michael.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



reply via email to

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