Hacker News new | ask | show | jobs
by guappa 473 days ago
I normally do it with a bitwise and of numbers that end with a sequence of 1s, like 7. so `i & 7 == 7`