Skip to content

Instantly share code, notes, and snippets.

@FabienArcellier
Last active December 9, 2015 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FabienArcellier/4345809 to your computer and use it in GitHub Desktop.
Save FabienArcellier/4345809 to your computer and use it in GitHub Desktop.
% list_contains(5, [1,2]) % Renvoie false
% list_contains(5, [1,5]) % Renvoie true
list_contains(X, [X|_]).
list_contains(X, [_|R]):- list_contains(X, R).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment