[m-dev.] for review: added two utility functions to list.m

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Mar 1 04:56:47 AEDT 2001


On 28-Feb-2001, Ralph Becket <rbeck at microsoft.com> wrote:
> > From: Fergus Henderson [mailto:fjh at cs.mu.OZ.AU]
> >
> > >         Added list__zip_with/3 function.
> > 
> > I don't think the name `zip_with' is a good idea here, because that
> > suggests a relationship with `zip', but this function is unrelated to
> > Mercury's `list__zip' -- Mercury's `list__zip' does something quite
> > different to Haskell's `zip'.
> > 
> > Unfortunately I can't think of any great alternatives off-hand.
> > Suggestions?
> 
> How about `list__map_corresponding'?

That's better.

Another alternative would be `list__det_map2', since this is just a
deterministic function variant of the existing list__map2 predicate.

> Personally, I think
> `list__interleave' is a better name for `list__zip', but it's
> probably too late to change now.

Agreed, on both counts.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list