Created
February 21, 2019 11:16
-
-
Save Gryff/f009de8b354a5ffa533765967caaf95d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
printStatement :: StateT [Transaction] IO () | |
printStatement = innerPrintStatement putStr | |
innerPrintStatement :: Monad m => (String -> m ()) -> StateT [Transaction] m () | |
innerPrintStatement printer = do | |
transactions <- get | |
let statement = generateStatement transactions | |
lift (printer statement) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment