Availability:
:- use_module(library(dcg/high_order)).
![Show source Source](/swish/pldoc/res/source.png)
//
Start, Element?, (Sep,Element)*, End
The example below matches a Prolog list of integers:
?- phrase(sequence(("[",blanks), number, (",",blanks), (blanks,"]"), L), `[1, 2, 3 ] a`, Tail). L = [1, 2, 3], Tail = [32, 97].