Continuations provide a means whereby heap space can be traded for stack depth (heap space being generally more plentiful than stack depth). They are especially useful where tail recursion is not possible. Here are a couple of simple continuation examples that can be extended to cover more complex scenarios.
88 people like thisPosted: 7 years ago by Neil Carrier
Computes the Cartesian product of a sequence of sequences. See corresponding example for a list of lists.
46 people like thisPosted: 7 years ago by Neil Carrier
Computes the Cartesian product of a list of lists. See also corresponding example for a sequence of sequences.
47 people like thisPosted: 7 years ago by Neil Carrier