:- use_module(library(when)).(can be autoloaded)
. See also freeze/2 and dif/2. The implementation can deal with cyclic terms in X and Y.
predicate is realised using attributed variables associated with the
when. It is defined in the autoload library