try using state monad
pass1 state monad working
.gitignore
no return value for state monad
fewer lines
shorter