[mercury-users] Pred defns

Lee Naish lee at cs.mu.OZ.AU
Fri Apr 3 12:48:33 AEST 1998


>> Actually, I did put in support for this.  It's even more desirable for
>> Prolog, since Prolog doesn't even have functions.  The syntax I chose, and
>> still don't like, is
>> 
>> 	map__set($map, Key1, Value1, $:=map),
>
>Hey, it looks OK to me, I'm not sure why you don't like it ;-)

Perhaps Peter would prefer it if postfix operator were used as I
suggested (to emphasise the accumulator id rather than the syntactic
gloop).  There is an added advantage with ':=' - the accumulator id is
on the left of the assignment operator, like most languages, eg:

	map__set(map#, Key1, Value1, map#:=),

	lee



More information about the users mailing list