Continuations

`

Continuation-style programming in Pascal:

  1. gen.p, generators and streams (e.g., for n-queens problem)
  2. nonDetParser.p, a non-deterministic parser
  3. brackets.p, generate all strings consisting of n pairs of matched parentheses, equivalent to enumerate all rooted ordered k-ary trees. Also see Recursion/Brackets/
See:
 
L. Allison, Some Applications of Continuations,
[The Computer Journal, Vol.31, No.1, pp.9-16, 1988]
and
L. Allison, Continuations Implement Generators and Streams,
[The Computer Journal, Vol.33, No.6, pp.460-465, 1990]