[m-dev.] diff: random permutations

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Feb 9 15:32:29 AEDT 2000


On 04-Jan-2000, Michael Day <mcda at cat.cs.mu.OZ.AU> wrote:
> 
> > I think those procedures would probably be more generally useful
> > building blocks.  And if we had both of those, there would be little
> > advantage in adding their combination.
> > 
> > Note that Haskell has special syntax for (1),
> 
> Would something like this be useful:
> 
> :- func '..'(T, T) = list(T) <= ordinal(T).
> :- mode '..'(in, in) = out is det.

Yes, but that would require designing an `ordinal' type class
(or equivalent), which is a non-trivial task that we should probably
leave for version 2 of the standard library.

For now I think a function just working on ints would be fine.

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