Add #39 Haskell solution