[mercury-users] polymorphism

Bart Demoen bmd at cs.kuleuven.ac.be
Sat Sep 27 19:16:17 AEST 1997


Peter Schachte wrote

> So even when the code for two different directions of the same
> predicate is entirely different, you may be able to share a lot more
> code if you code it as one predicate rather than two.

Sorry for being slow, but I don't understand this: how can the code
for two different directions of the same predicate be entirely
different (at the source level) ? Isn't the only way by defining
another predicate for the other mode ?

Bart





More information about the users mailing list