emacs-devel
[Top][All Lists]
Advanced

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

Re: streams are cool, you could stream virtually anything!


From: Artur Malabarba
Subject: Re: streams are cool, you could stream virtually anything!
Date: Thu, 5 Nov 2015 23:05:16 +0000


On 5 Nov 2015 9:58 pm, "Nicolas Petton" <address@hidden> wrote:
>
> Michael Heerdegen <address@hidden> writes:
>
> > 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?
>
> I guess so, as long as we don't add too many such functions.

I dunno. The way I think of streams it makes perfect sense to have a pop without a push. But maybe that's just me. You could call it stream-next or something like that, so people won't be confused by the lack of push.


reply via email to

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