diff options
Diffstat (limited to 'stdlib.pl')
-rw-r--r-- | stdlib.pl | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -55,3 +55,14 @@ A @>= B :- A == B. A @>= B :- A @> B. + +% List predicates + +length([], 0). +length([_|Tail], Length) :- + length(Tail, Length0), + Length is Length + 1. + +member(X, [X|_]). +member(X, [_|Tail]) :- + member(X, Tail). |