All posts by Lvyn

Replacing for loops by range based loops

Last week when working on an experimental project at my daily job, I remarked that I ended up making lots of range base loops and lots of for loops. These for loops were basically simple 0..K ranges where K was dynamic, then I asked myself if there were Python-like range iterators for sequences instead of for loops in the standard library. I found none. Then I decided to give it a try and code one by myself.

Read More »