[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stream implementation of seq-mapn
From: |
Michael Heerdegen |
Subject: |
Re: Stream implementation of seq-mapn |
Date: |
Mon, 18 Dec 2017 13:51:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Nicolas Petton <address@hidden> writes:
> > [...]
> > +(cl-defmethod seq-mapn (function (stream stream) &rest streams)
> > + "Map FUNCTION over the STREAMS.
> I would add to the docstring that all elements of `streams' should be
> streams, otherwise it will default to the generic implementation.
I already had "all the STREAMS must be streams", but that looked weird.
> > + (if (not (cl-every #'streamp streams))
> ^^^^^^^^
> Since this is for stream.el, why not use `seq-every-p'?
> > + (cl-call-next-method)
> > + (cl-callf2 cons stream streams)
> > + (stream-make
> > + (unless (cl-some #'seq-empty-p streams)
> ^^^^^^^
> Same question :-)
Ok, done.
> > (1) Is it ok to implement it with `cl-call-next-method' this way?
>
> I guess it is. Have you tried running `seq-mapn' with a mix of streams
> and lists?
Sure. I does what I want: the default method is invoked.
Michael.
- Stream implementation of seq-mapn, Michael Heerdegen, 2017/12/18
- Re: Stream implementation of seq-mapn, Nicolas Petton, 2017/12/18
- Re: Stream implementation of seq-mapn,
Michael Heerdegen <=
- Re: Stream implementation of seq-mapn, Nicolas Petton, 2017/12/18
- Re: Stream implementation of seq-mapn, Michael Heerdegen, 2017/12/19
- Re: Stream implementation of seq-mapn, Nicolas Petton, 2017/12/19
- Re: Stream implementation of seq-mapn, Michael Heerdegen, 2017/12/26
- Re: Stream implementation of seq-mapn, Nicolas Petton, 2017/12/29
- Re: Stream implementation of seq-mapn, Michael Heerdegen, 2017/12/30