)
or a term with functor `.' and arity 2
and the second argument is a list. (28)
This predicate acts as if defined by the following definition:
is_list(X) :-
var(X), !,
fail.
is_list([]).
is_list([_|T]) :-
is_list(T).
|
?- flatten([a, [b, [c, d], e]], X). X = [a, b, c, d, e] |