Samples in Haskell or Erlang