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

Ondrej Bojar obo at cuni.cz
Fri Jan 12 15:00:34 AEDT 2007

Julien Fischer wrote:
>> which could be simplified to:
>>  foldl(
>>    (pred(Elem::in,
>>          !{Aku1, Aku2}::!(in, out)
>> In other words, !{A, B}  would be considered equal to
>>      {!.A, !.B}, {!:A, !:B}
> Is there any reason you wouldn't just restructure the arguments of
> the closure to work with foldl2?

There are many ADTs that have some sort of fold implemented (fold_up, 
down, left, right, topleft...) but very few have also all fold2, fold3, 
fold4 variants...


Ondrej Bojar (mailto:obo at cuni.cz)
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