polymorphism

Tomas By T.By at dcs.shef.ac.uk
Wed Sep 24 20:16:46 AEST 1997


Hi,

Suppose I have the following types:

   :- type a(X,Y) ---> x(X) ; y(Y) ; z(int).

   :- type i ---> [...].
   :- type j ---> [...].

   :- type m ---> [...].
   :- type n ---> [...].

and I want a single procedure 'p/1' that handles things of the types:

   a(i,m)
   a(i,n)
   a(j,m)
   a(j,n)

but no others. Is this possible? How do I declare it?

/Tomas




More information about the users mailing list