Removed more advanced Haskell syntax from example code to keep things simple