/usr/lib/swipl/library/dcg/high_order.pl
AllApplicationManualNameSummaryHelp

  • library
    • dcg
      • basics.pl -- Various general DCG utilities
      • high_order.pl -- High order grammar operations
        • sequence//2
        • sequence//3
        • sequence//5
        • optional//2
        • foreach//2
        • foreach//3
 sequence(:Element, :Sep, ?List)// is nondet
Match or generate a sequence of Element where each pair of elements is separated by Sep. When parsing, a matched Sep commits. The final element is not committed. More formally, it matches the following sequence:
Element?, (Sep,Element)*

See also sequence//5.