Using State Monad in Smear Glitcher