6 ms·
Not sure why this got downvoted. The technique could be implemented without conditionals, but not in python, and not using iterators. You could do it in C, an
by swisniewski 10mo ago
Not sure why this got downvoted.
The technique could be implemented without conditionals, but not in python, and not using iterators.
You could do it in C, and use & and ~ to make the cyclic counters work.
But, like I mentioned, the code in the article is very far from being free of conditionals.
- abustamam 10mo agoI didn't down vote, but it does seem like unnecessary pedantry. Maybe it could be better phrased as "without writing any conditionals"