[mercury-users] using some [ ... ] in function definition

Ondrej Bojar bojar at csse.unimelb.edu.au
Fri Aug 10 10:45:27 AEST 2007


Hi, all.

Is there a concise way to use some [ ... ] in function definitions?

I'd like to be able to type something like:

some[!D]
my_func(In) = !.D :-
   !:D = new,
   modify(In, !D).

whereas the only valid syntax I could come up with is the boring standard one:

my_func(In) = OutD :- some[!D] (
   !:D = new,
   modify(In, !D),
   OutD = !.D
   ).

Cheers, Ondrej.

-- 
Ondrej Bojar (mailto:obo at cuni.cz / bojar at ufal.mff.cuni.cz)
http://www.cuni.cz/~obo
--------------------------------------------------------------------------
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