3 ms·You can also do this in Haskell using the State monad and do notation.by efnx 12y agoYou can also do this in Haskell using the State monad and do notation.