In the following, either of the first two constraints work, but the third one doesn't. local
   fun {Plus2 X Y} X + Y end
   proc {Plus3 X Y Z} X + Y =: Z end

(...)

I think that if you replace Plus2 with

   fun {Plus2 X Y}
      Z={FD.decl}
   in
      X + Y =: Z
      Z
   end
You know, that's equivalent to Plus2=Plus3 ! ;-)

Not exactly - Plus3 = FD.plus, actually ;-) My version of Plus2 adds Z={FD.decl} (so that it works in Russ's script); your version of adds this for X and Y. But I think that the "fun" notation is more readable and goes well with the way that Russ is using it (that's why I named it Plus2).

OK, so here is my ultimate contribution:

fun {Plus2 X Y}
   Z={FD.decl}
in
   X={FD.decl} Y={FD.decl}
   X + Y =: Z
   Z
end

and I think that our collection is now complete :-)

Cheers,
Filip
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to