[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: streams are cool, you could stream virtually anything!
From: |
Michael Heerdegen |
Subject: |
Re: streams are cool, you could stream virtually anything! |
Date: |
Thu, 05 Nov 2015 17:48:09 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
raman <address@hidden> writes:
> I dont like stream-pop because users might then expect there to be a
> stream-push --- which might cause confusion.
Actually I plan a `stream-push' - why not? There is nothing wrong with
that; `push' itself doesn't modify any list, it just sets the PLACE to
the newly created cons
(cons NEWELT PLACE)
We can do the very same for streams; just use `stream-cons' instead of
`cons':
--8<---------------cut here---------------start------------->8---
(defmacro stream-push (newelt place)
"Add NEWELT to the stream stored in PLACE.
This is equivalent to (setf PLACE (stream-cons NEWELT PLACE))."
`(cl-callf2 stream-cons ,newelt ,place))
--8<---------------cut here---------------end--------------->8---
Would that be ok?
Regards,
Michael
- Re: ELPA policy, (continued)
- Re: ELPA policy, Eli Zaretskii, 2015/11/09
- Re: ELPA policy, Rasmus, 2015/11/09
- Re: ELPA policy, Achim Gratz, 2015/11/09
- streams and generators (was: streams are cool, you could stream virtually anything!), Michael Heerdegen, 2015/11/05
- Re: streams and generators, Dmitry Gutov, 2015/11/05
- Re: streams are cool, you could stream virtually anything!, Michael Heerdegen, 2015/11/04
- Re: streams are cool, you could stream virtually anything!, Nicolas Petton, 2015/11/05
- Re: streams are cool, you could stream virtually anything!, Artur Malabarba, 2015/11/05
- Re: streams are cool, you could stream virtually anything!, Nicolas Petton, 2015/11/05
- Re: streams are cool, you could stream virtually anything!, raman, 2015/11/05
- Re: streams are cool, you could stream virtually anything!,
Michael Heerdegen <=
- Re: streams are cool, you could stream virtually anything!, Nicolas Petton, 2015/11/05
- Re: streams are cool, you could stream virtually anything!, Artur Malabarba, 2015/11/05
- Re: streams are cool, you could stream virtually anything!, T.V Raman, 2015/11/05
- Re: streams are cool, you could stream virtually anything!, Artur Malabarba, 2015/11/05
- Re: streams are cool, you could stream virtually anything!, T.V Raman, 2015/11/05
- Re: streams are cool, you could stream virtually anything!, Michael Heerdegen, 2015/11/05
- Re: streams are cool, you could stream virtually anything!, John Wiegley, 2015/11/05
- Re: streams are cool, you could stream virtually anything!, Michael Heerdegen, 2015/11/05
- Re: streams are cool, you could stream virtually anything!, Filipp Gunbin, 2015/11/06
- Re: streams are cool, you could stream virtually anything!, Nicolas Petton, 2015/11/06