- let state = Password {password = start}
- in print $ runIdentity (runStateT (runWriterT (apply instructions)) state)
- -- in putStrLn $ password $ runIdentity (execStateT (runWriterT (apply instructions)) state)
+ let st = Password {password = start}
+ ((_, log), st') = runIdentity (runStateT (runWriterT (apply instructions)) st)
+ in do
+ -- putStrLn $ unlines $ map (action) log
+ putStrLn $ password st'