Haskell sucks, but they don't even know Haskell. There's a package (https://hackage.haskell.org/package/monad-loops) which contains `whileM`, a pure while-loop which works with any Monad.
Mine have multiple variables, no monads, and no side effects - it all gets done by tail recursion.