From: Nicolas Petton <nicolas@petton.fr>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: emacs-devel@gnu.org
Subject: Re: [ANN] New library stream.el in ELPA
Date: Thu, 15 Oct 2015 09:38:28 +0200 [thread overview]
Message-ID: <878u74y423.fsf@petton.fr> (raw)
In-Reply-To: <87h9ltxfnh.fsf@web.de>
[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]
Michael Heerdegen <michael_heerdegen@web.de> writes:
> I tried this stress test with your lib:
>
> --8<---------------cut here---------------start------------->8---
> (defun stream-append (s1 s2)
> (if (stream-empty-p s1) s2
> (stream-cons
> (stream-first s1)
> (stream-append (stream-rest s1) s2))))
>
> (seq-elt (stream-append
> (stream (cl-loop for i from 1 to 100 collect i))
> (seq-filter
> #'cl-oddp
> (stream-append
> (stream (cl-loop for i from 1 to 50000 collect i))
> (seq-map #'1+ (stream (cl-loop for i from 50001 to 100001 collect i))))))
> 40000)
> --8<---------------cut here---------------end--------------->8---
>
> What can I say - it work well!
:-)
>
> BTW, is `stream-append' missing in your library, or should that be done
> via some `seq' function?
It could be done with `seq-concatenate', but it would not be lazy, and
would return a sequence (consuming the entire stream!). Adding
`stream-append' would indeed make sense.
The repository is https://github.com/NicolasPetton/stream, if you want
to send me a patch.
Nico
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
next prev parent reply other threads:[~2015-10-15 7:38 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 11:43 [ANN] New library stream.el in ELPA Nicolas Petton
2015-10-14 12:37 ` Michael Heerdegen
2015-10-14 13:20 ` Nicolas Petton
2015-10-14 13:33 ` Michael Heerdegen
2015-10-14 13:30 ` Nicolas Petton
2015-10-14 22:13 ` Michael Heerdegen
2015-10-15 7:38 ` Nicolas Petton [this message]
2015-10-14 16:09 ` John Wiegley
2015-10-14 16:20 ` Nicolas Petton
2015-10-14 16:40 ` John Wiegley
2015-10-14 19:31 ` Nicolas Petton
2015-10-14 21:31 ` John Wiegley
2015-10-14 21:51 ` Nicolas Petton
2015-10-15 0:42 ` raman
2015-10-15 0:48 ` John Wiegley
2015-10-18 18:29 ` Daniel Colascione
2015-10-19 4:38 ` Stephen J. Turnbull
2015-10-20 6:55 ` John Wiegley
2015-10-20 7:02 ` Daniel Colascione
2015-10-20 15:18 ` John Wiegley
2015-10-20 16:16 ` Jay Belanger
2015-10-20 10:20 ` Stephen J. Turnbull
2015-10-20 12:07 ` David Kastrup
2015-10-23 11:30 ` Nicolas Petton
2015-10-23 19:21 ` John Wiegley
2015-10-15 10:08 ` Michael Heerdegen
2015-10-15 18:25 ` John Wiegley
2015-10-15 22:13 ` Nicolas Petton
2015-10-15 20:28 ` John Mastro
2015-10-15 22:02 ` Nicolas Petton
2015-10-24 19:16 ` Michael Heerdegen
2015-10-24 20:52 ` Nicolas Petton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878u74y423.fsf@petton.fr \
--to=nicolas@petton.fr \
--cc=emacs-devel@gnu.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.