Mercury syntax?

Marko Schuetz marko at ki.informatik.uni-frankfurt.de
Thu Aug 21 22:07:42 AEST 1997


This may have been discussed before, but I joined this list only
recently:

Why is it not possible to use a data constructor as a curried
relation between its arguments and its result?

I would like to write:

list__map(intersection(A), List1, List2) where intersection is a
binary constructor. This is not accepted (mercury-0.6). But I can
write:

list__map((pred(K1::in, K2::out) is det :- K2 = intersection(B, K1))
         , List1
         , List2
         )

Is there a strong reason to favor the latter over the former?

Marko




More information about the users mailing list