Continuations can be used to implement
non-standard control mechanisms such as
[an error occurred while processing this directive]
[4,2,5,3,1]] : int list list
either passes on its continuation twice,
once to each its two alternatives, gen1 and gen2.
queens n can be read as,
"do the following n times (doo n),
choose an int between 1 and n inclusive (choose n)
check that it does not invalidate the
problem's constraints (filter valid)
given the previous choices."
- Continuations Implement Generators and Streams.
The Computer J., 33(5), pp.460-465, 1990,
- and more
| :: || cons |
| [x1,...] || list |
| [ ] || list |
| @ || append |
| fn => || &lambda . |
| : || has type |