[m-dev.] And yet another, tuples of state variables.

Ondrej Bojar obo at cuni.cz
Fri Jan 12 12:39:29 AEDT 2007


Hi,

Another construction I tend to type way too often is:

   foldl(
     (pred(Elem::in,
           {!.Aku1, !.Aku2}::in,
           {!:Aku1, !:Aku2}::out) is det :- ..

which could be simplified to:

   foldl(
     (pred(Elem::in,
           {Aku1, Aku2}::!(in, out)
%       or possibly rather
           !{Aku1, Aku2}::!(in, out)

In other words, !{A, B}  would be considered equal to
       {!.A, !.B}, {!:A, !:B}

How does it sound to you?

Cheers, O.

-- 
Ondrej Bojar (mailto:obo at cuni.cz)
http://www.cuni.cz/~obo
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list