6 ms·
Pop and swap while iterating is definitely a useful feature. You can also queue removals up and do the pop and swap all together on a cleanup pass (snippet belo
by matiasfernandez 4y ago
Pop and swap while iterating is definitely a useful feature. You can also queue removals up and do the pop and swap all together on a cleanup pass (snippet below). That said, most people don't code this way, so yeah, useful for sure.
https://github.com/matias-eduardo/conway/blob/2496472b0018bbb88c2a8e17fd3462a3c5b4327f/main.odin#L327-L339 https://github.com/matias-eduardo/conway/blob/2496472b0018bb...