[m-users.] delay declarations in Mercury
matthias.guedemann at googlemail.com
Fri Jan 23 19:34:01 AEDT 2015
at the authors describe delay declarations as an important feature
for efficient programming in Prolog.
Using SICStus, one can for example write:
| :- block less_than_equal(-,?), less_than_equal(?,-).
| less_than_equal(X,Y) :- X=<Y.
For Mercury, isn't this simply the same as declaring the predicate
less_than_equal/2 with only the following mode?
| :- mode less_than_equal(in, in) is semidet.
If yes, is it in general possible to express the delay declarations in
Mercury using mode declarations?
More information about the users