ux104$ cat test.pl |
p(0,X,X). |
p(s(X),Y,s(Z)) :- p(X,Y,Z). |
ux104$ /home08/masuhara/local/bin/swipl |
Welcome to SWI-Prolog (Multi-threaded, Version 5.4.5) |
Copyright (c) 1990-2003 University of Amsterdam. |
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, |
and you are welcome to redistribute it under certain conditions. |
Please visit http://www.swi-prolog.org for details. |
|
For help, use ?- help(Topic). or ?- apropos(Word). |
|
1 ?- consult('test.pl'). |
Warning: (/home08/masuhara/test.pl:11): |
Singleton variables: [X] |
% test.pl compiled 0.00 sec, 1,196 bytes |
|
Yes |
2 ?- p(s(s(0)),s(s(s(0))),X). |
|
X = s(s(s(s(s(0))))) |
より詳しい情報は以下のようなページから入手できるかも知れない: