Prolog cheat sheet

Prolog predefined stuff Useful custom functions = – unification = – true if unification fails == – identity == – identity predicate negation =:= – arithmetic equality predicate == – arithmetic equality negation member(X,List) conc(L1,L2,List) add(X,L,L1) del(X,L,L1) insert(X,L,L1) sublist(S,L) permutation(X,L)oddLength(L) evenLength(L)reverse(List,ReversedList)maxList(List,Max) ordered(List) subsum(Set,Sum,Subset) X<Y X>Y X>=Y X<=Y custom operator :-op(precedense,xfy,name). cut ! true, fail %(P,!,fail;true). […]