Original problem definition http://homepages.inf.ed.ac.uk/wadler/papers/expression/expression.txt
The implementation is inspired by following presentation http://www.infoq.com/presentations/object-algebras
Dart language implementation is directly taken from the talk.
My goal is to port the solution in java and c++.