Hacker News new | ask | show | jobs
by swisniewski 207 days 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.

1 comments

I didn't down vote, but it does seem like unnecessary pedantry. Maybe it could be better phrased as "without writing any conditionals"