[Haskell-beginners] The Fun of Programming, Chapter 6, How to Write a Financial Contract