I would prefer `set.indexOf(closestElem) < 0` here. I'm not against `~`, but `!~` does my head in. :)