ZipWithIndex: `whileM` was replaced with `forM`

and therefore, the implementation is more concise, since we don't have
to modify the input list manually.