Initial value for unfold(-right)
John Cowan
(10 Jan 2015 23:49 UTC)
|
Re: Initial value for unfold(-right)
Takashi Kato
(11 Jan 2015 11:39 UTC)
|
Re: Initial value for unfold(-right)
Arthur A. Gleckler
(11 Jan 2015 17:19 UTC)
|
Re: Initial value for unfold(-right)
Takashi Kato
(11 Jan 2015 18:44 UTC)
|
Re: Initial value for unfold(-right)
Arthur A. Gleckler
(11 Jan 2015 21:15 UTC)
|
Re: Initial value for unfold(-right) Takashi Kato (12 Jan 2015 06:14 UTC)
|
Re: Initial value for unfold(-right)
Arthur A. Gleckler
(12 Jan 2015 06:16 UTC)
|
Re: Initial value for unfold(-right)
John Cowan
(12 Jan 2015 13:27 UTC)
|
Re: Initial value for unfold(-right) Takashi Kato 12 Jan 2015 06:14 UTC
On 11/01/2015 22:15, Arthur A. Gleckler wrote: > The problem with that is that it's O(N), whereas the optional parameter > allows it to be O(1). Think of accumulating incoming batches of work. > Each batch could be added to the existing queue without copying. Maybe I'm misunderstanding but it would cost O(N) if the list of given queue is copied (that's what John suggested) and my imaginary procedure list-queue-add-back-all! might only cost O(1) if it wouldn't copy the list (though there is a procedure which mutates queue's elements so it should take O(N) to copy for safety). BTW, why is there no queue appending procedure like list-queue-add-back-all!? Cheers, -- _/_/ Takashi Kato E-mail: xxxxxx@ymail.com