[mercury-users] map__foldl2

David Glen JEFFERY dgj at cs.mu.OZ.AU
Fri Dec 17 15:47:39 AEDT 1999


On 17-Dec-1999, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> 
> I'm not sure what a good syntax would be for writing code for different
> modes would be.

How about mode qualifying the arguments at the head of a clause?

eg.

p(f(X)::in, Z::out) :-	% This clause applies to only one mode
	...

p(g(X)::out, Z::in) :-	% This clause applies to a different mode
	...

p(X, [Z]) :-		% This clause applies to all modes
	...


dgj
-- 
David Jeffery (dgj at cs.mu.oz.au) | If your thesis is utterly vacuous
PhD student,                    | Use first-order predicate calculus.
Dept. of Comp. Sci. & Soft. Eng.|     With sufficient formality
The University of Melbourne     |     The sheerist banality
Australia                       | Will be hailed by the critics: "Miraculous!"
                                |     -- Anon.
--------------------------------------------------------------------------
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