[m-dev.] For review: small addition to list.m
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Oct 4 02:46:24 AEDT 2000
On 28-Sep-2000, Ralph Becket <rbeck at microsoft.com> wrote:
> This is an idiom I often find useful...
>
> Estimated hours taken: 0.1
>
> Added a pred that decomposes a non-empty list into its head
> and tail (an error is raised if the input list is empty).
>
> library/list.m:
> Added pred list__det_head_tail/3.
There's nothing wrong with that change (except that you forgot
to mention the new function in the NEWS file), but on principle I vote
against adding that one to the standard library, on the grounds that
we shouldn't add functions to the standard library unless they are
going to be widely used, and thus far I don't recall off-hand any
occaision on which I would have wanted to use list__det_head_tail/3.
If there was a clamour of support for this function from other users,
I'd be happy to reconsider my vote ;-).
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- 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