[m-users.] Why has this the determinism category "nondet"?
Volker Wysk
post at volker-wysk.de
Sat Feb 16 07:21:36 AEDT 2019
Am Freitag, 15. Februar 2019, 20:49:17 CET schrieb Zoltan Somogyi:
> On Fri, 15 Feb 2019 20:42:23 +0100, Volker Wysk <post at volker-wysk.de> wrote:
> > :- pred vorder(list(T)::in, list(T)::in, list(T)::out) is det.
> >
> > vorder([X|A], [X|B], [X|C]) :-
> >
> > vorder(A,B,C).
> >
> > vorder([X|_], [Y|_], []) :-
> >
> > X \= Y.
>
> This post on stack overflow explains the source of your problem with these
> two clauses.
>
> https://stackoverflow.com/questions/7466833/mercury-determinism-and-pattern-> matching
Yes, this explains it. Thanks!
Volker
More information about the users
mailing list