Re: Initial value for unfold(-right)
Takashi Kato 11 Jan 2015 18:44 UTC
On 11/01/2015 18:19, Arthur A. Gleckler wrote:
> Yes, except that I was proposing that the /initial/ argument be a
> list-queue, not a list, to facilitate using list-queue-unfold to add to
> an existing queue.
Aha, I misunderstood the proposal.
> I don't see why types are relevant here in particular. If the caller
> doesn't want different types, he shouldn't supply an initial list-queue
> that holds a different type. That's just a programming error, not an
> error in the API.
It's just my feeling that unfold related procedure should return a
container only contains the values given mapper procedure returned.
I agree with that it's not an error in the API. However it might be
clear if users could write something like the following (again it's
just my preference):
(list-queue-add-back-all! (list-queue-unfold ...) initial)
Cheers,
--
_/_/
Takashi Kato
E-mail: xxxxxx@ymail.com