[mercury-users] Maths and contexts.

Peter Wang novalazy at gmail.com
Fri Apr 20 18:02:22 AEST 2012


On Fri, 20 Apr 2012 13:25:42 +0800, Michael Richter <ttmrichter at gmail.com> wrote:
> So while it would be
> easy to do divide(1, 3, MyContext) in code, that's not really an acceptable
> solution because I can't do 1 / 3 (MyContext) (or whatever).  "/" (and
> other mathematical operations' predicates/functions) is militantly
> outfitted with an arity of 2.

Not a serious suggestion:

    :- func context ^ ( number + number ) = number.

Peter
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list