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

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Mar 1 03:41:37 AEDT 2001


On 28-Feb-2001, Ralph Becket <rbeck at microsoft.com> wrote:
> library/list.m:
>         Added list__cons/2 function.

Fine.

>         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?

As for the implementation, I think it would be more consistent
with the code elsewhere for that function to call error/1
(i.e. throw a `software_error' exception) rather than throwing
a raw string.

-- 
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