Changed code example from f# to haskell