mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 10:53:40 +00:00
33 lines
479 B
Mathematica
33 lines
479 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- module loop_in_disj.
|
|
:- interface.
|
|
|
|
:- pred p(int::out) is det.
|
|
|
|
:- pred q(int::out) is det.
|
|
|
|
:- implementation.
|
|
|
|
:- pred loop is erroneous.
|
|
|
|
loop :-
|
|
loop.
|
|
|
|
p(X) :-
|
|
(
|
|
loop
|
|
;
|
|
X = 42
|
|
).
|
|
|
|
q(X) :-
|
|
(
|
|
loop,
|
|
X = 41
|
|
;
|
|
X = 42
|
|
).
|