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.
98 people like thisPosted: 13 years ago by Neil Carrier
Computes the Cartesian product of a sequence of sequences. See corresponding example for a list of lists.
55 people like thisPosted: 13 years ago by Neil Carrier
Computes the Cartesian product of a list of lists. See also corresponding example for a sequence of sequences.
49 people like thisPosted: 13 years ago by Neil Carrier