https://stackoverflow.com/questions/61123307/how-to-print-intermediate-result-in-functor-and-applicative-in-haskell