Use an IntSet instead
Rewrite with foldr