Jobs Puzzle in CurryImplementation of the
by Sebastian Fischer, January 2015
Verbal problem description
There are four people: Roberta, Thelma, Steve, and Pete.
|A German blog post translating Java code for the build tool Ant to Scala|
|made me translate the Scala code to Haskell. I added combinators for binary|
|composition of mappers as well as a unit mapper for one of them. The code is|
|still shorter. I find the Haskell version more readable because expressions|
|and their types are separate rather than interleaved as in Scala.|
Both template languages let programmers write markup directly in a markup language rather than generating it from within Haskell. Compared with static HMTL, template languages support substitution to dynamically determine parts of the content of the generated page.
[Heist] and [Hamlet] support different constructs to generate content dynamically. They also differ regarding their syntax for static content.
Delimited continuations manipulate the control flow of programs. Similar to control structures like conditionals or loops they allow to deviate from a sequential flow of control.
We use exception handling as another example for control flow manipulation and later show how to implement it using delimited continuations. Finally, we show that nondeterminism can also be expressed using delimited continuations.