This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/regression/cyclics.yap
Vitor Santos Costa 700d6ae707 fixes
2019-01-25 13:54:02 +00:00

13 lines
939 B
Prolog

:- X = [], copy_term(X,Y), writeln('....'), writeln(X), writeln(Y).
:- X = [_A], copy_term(X,Y), writeln('....'), writeln(X), writeln(Y).
:- X = [a,_A], copy_term(X,Y), writeln('....'), writeln(X), writeln(Y).
:- X = [X], copy_term(X,Y), writeln('....'), writeln(X), writeln(Y).
:- X = [_|X], copy_term(X,Y), writeln('....'), writeln(X), writeln(Y).
:- X= f(X), copy_term(X,Y), writeln('....'), writeln(X), writeln(Y).
:- X= f(X,X), copy_term(X,Y), writeln('....'), writeln(X), writeln(Y).
:- X= f(_,X), copy_term(X,Y), writeln('....'), writeln(X), writeln(Y).
:- X= f(A,A,X), copy_term(X,Y), writeln('....'), writeln(X), writeln(Y).
:- X= f(A,g(X,[A|A]),X), copy_term(X,Y), writeln('....'), writeln(X), writeln(Y).
:- X= f(X,[X,X]), copy_term(X,Y), writeln('....'), writeln(X), writeln(Y).
:- X= f(X,[X,g(X)]), copy_term(X,Y), writeln('....'), writeln(X), writeln(Y).
:- X=f(_,X/[X]),copy_term(X,Y), writeln('....'),writeln(X),writeln(Y).