Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: