I feel like the functional version is harder to read though due to all the state being parameters and the addition of the extra logic of `toMarked`, no? Also, the the quicker bail out I don't believe is truly a quicker bailout because the `forall` just continues the iteration, except the iteration is now hidden.