[Haskell-beginners] my ugly code and the Maybe monad