Added emulation of the =@=/2 predicate to the SWI-Prolog compatibility library.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1891 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
24ade76e94
commit
211e5cec2b
@ -107,6 +107,13 @@ and change working directory to @var{New}. Use the pattern
|
|||||||
@code{working_directory(CWD, CWD)} to get the current directory. See
|
@code{working_directory(CWD, CWD)} to get the current directory. See
|
||||||
also @code{absolute_file_name/2} and @code{chdir/1}.
|
also @code{absolute_file_name/2} and @code{chdir/1}.
|
||||||
|
|
||||||
|
@item @@@var{Term1} =@@= @@@var{Term2}
|
||||||
|
@findex =@@=/2
|
||||||
|
@snindex =@@=/2
|
||||||
|
@cnindex =@@=/2
|
||||||
|
|
||||||
|
True iff @var{Term1} and @var{Term2} are structurally equivalent. I.e. if @var{Term1} and @var{Term2} are variants of each other.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@node Invoking Predicates on all Members of a List,Forall, , SWI-Prolog
|
@node Invoking Predicates on all Members of a List,Forall, , SWI-Prolog
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
|
|
||||||
:- use_module(library(terms),[term_variables/2,
|
:- use_module(library(terms),[term_variables/2,
|
||||||
term_variables/3,
|
term_variables/3,
|
||||||
term_hash/2]).
|
term_hash/2,
|
||||||
|
variant/2]).
|
||||||
|
|
||||||
:- multifile
|
:- multifile
|
||||||
prolog:message/3.
|
prolog:message/3.
|
||||||
@ -238,3 +239,7 @@ prolog:intersection([_|T], L, R) :-
|
|||||||
prolog:intersection(T, L, R).
|
prolog:intersection(T, L, R).
|
||||||
|
|
||||||
|
|
||||||
|
:- op(700, xfx, '=@=').
|
||||||
|
|
||||||
|
prolog:(Term1 =@= Term2) :-
|
||||||
|
variant(Term1, Term2), !.
|
||||||
|
Reference in New Issue
Block a user