[m-dev.] for review: use bitsets in quantification
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Nov 8 03:43:15 AEDT 2000
On 07-Nov-2000, Ralph Becket <rbeck at microsoft.com> wrote:
> What we seem to be angling towards is something like Okasaki's
> typeclass with reversible hashing, with the further constraint
> that the hashes must form a contiguous set.
Ah, I never thought of it that way.
`reversible_hash' is certainly a much better mnemonic than the
`convertable_to_int' name that I suggested for the non-contiguous
version. It immediately suggests a use...
Does Okasaki make much use of this type class?
> So we include (at least) to_int/1, from_int/1, first/0, last/0.
> I think pred/1 and succ/1 should also go in there as methods
> rather than utility functions since they may be more economically
> implemented than
> pred(X) = from_int(to_int(X) - 1)
> succ(X) = from_int(to_int(X) + 1)
Could you give an example of a more economic implementation?
--
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