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/Logtalk/examples/modules/list.lgt

10 lines
158 B
Plaintext
Raw Normal View History

:- module(list, [contained/2, notcontained/2]).
contained(H, [H| _]).
contained(H, [_| T]) :-
contained(H, T).
notcontained(H, L) :-
\+ contained(H, L).