[mercury-users] Dispatch tables? Curried functions?
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Jun 5 15:46:19 AEST 2002
On 05-Jun-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> Douglas Michael Auclair, Wednesday, 5 June 2002:
> > I wish to create a map that has string keys and function values to use as a
> > dispatch table. The problem I have is that predicate lookup/3 returns the
> > function in the ground state, not the state of the function (e.g.:
> > func((ground -> ground), (ground -> ground)) = (free -> ground)) -- the
> > function lookup also returns the function in the undesired ground state.
>
> Function insts of the form
>
> func(in, ..., in) = out is det
>
> are sub-insts of ground. You can have collections of them without
> having to worry about modes.
Note that this is only the case since Oct 12th last year,
so to make use of this, you do need to use a ROTD release
rather than 0.10.1.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list