[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: streams are cool, you could stream virtually anything!
From: |
T.V Raman |
Subject: |
Re: streams are cool, you could stream virtually anything! |
Date: |
Thu, 5 Nov 2015 15:34:49 -0800 |
I still like these things to be in pairs, and I'm not particularly
sold on having stream-pop.
I like the symmettry in stream-head and stream-tail -- probably
because I originally learnt streams from SICP.
Artur Malabarba writes:
> 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.
>
--
--
- streams and generators (was: streams are cool, you could stream virtually anything!), (continued)
- 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, 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!, Artur Malabarba, 2015/11/05
- Re: streams are cool, you could stream virtually anything!,
T.V Raman <=
- 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
- Re: streams are cool, you could stream virtually anything!, Artur Malabarba, 2015/11/06
- Re: streams are cool, you could stream virtually anything!, Nicolas Petton, 2015/11/06
- Re: streams are cool, you could stream virtually anything!, John Wiegley, 2015/11/06