Example
l
Define the function
member
which tests
whether the first argument is an element
of the list in the second argument.
l
member(X, [ ]) => 0;
l
member(X, [F | R]) =>
(X == F) ? 1 : member(X, R);
conditional expression
(as in C++, Java)