following along with an implementation of redo in haskell