Prolog Language Definite Clause Grammars (DCGs) Anything at all: `... //0`


Example

One of the most elementary DCG nonterminals is ... //0, which can be read as "anything at all":

... --> [] | [_], ... .

It can be used to describe a list Ls that contains the element E via:

phrase(( ..., [E], ... ), Ls)