API sets and other specific comments Shiro Kawai (21 Jan 2016 01:38 UTC)
Re: API sets and other specific comments John Cowan (22 Jan 2016 20:34 UTC)
Re: API sets and other specific comments Shiro Kawai (23 Jan 2016 02:11 UTC)
Re: API sets and other specific comments Shiro Kawai (25 Jan 2016 02:03 UTC)
Re: API sets and other specific comments John Cowan (25 Jan 2016 19:30 UTC)
Re: API sets and other specific comments Shiro Kawai (25 Jan 2016 20:01 UTC)
Re: API sets and other specific comments Shiro Kawai (26 Jan 2016 02:23 UTC)
Re: API sets and other specific comments John Cowan (29 Jan 2016 01:45 UTC)
Re: API sets and other specific comments Shiro Kawai (29 Jan 2016 04:08 UTC)
Re: API sets and other specific comments John Cowan (29 Jan 2016 15:00 UTC)
Re: API sets and other specific comments Shiro Kawai (29 Jan 2016 19:21 UTC)
Re: API sets and other specific comments John Cowan (30 Jan 2016 03:02 UTC)

Re: API sets and other specific comments John Cowan 29 Jan 2016 15:00 UTC

Shiro Kawai scripsit:

> I do use *-tabulate time to time; it saves space for stop-predicate
> and next-procedure of *-unfold.   In languages with concise partial
> application such as Haskell we won't probably need it, but with Scheme,
> saving a few lambdas sometimes makes the expression fit in one line nicely.

A good argument.  I'll add it.

> > But should the map function return lists or ideques?  It seems heavyweight
> > to return ideques that are then just copied and discarded, whereas
> > returning lists seems inconsistent.  That's why I left this out.
>
> I'm thinking of rerturning ideque.  It's (ideque-filter values (ideque-map
> proc ideque ...))
> but saves creating intermediate ideque.

Correct, but does the 'proc' return a list or an ideque?  It has to
return some intermediate sequence data structure, since the whole point
of map-append is for one-to-many mappings.  Returning an ideque is more
consistent, but returning a list is cheaper.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
        You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
        You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
                Clear all so!  `Tis a Jute.... (Finnegans Wake 16.5)