[Haskell-beginners] Mapping list over datatype using Traversable and State monad.