When should I use a Set in Ruby?
Array is so common in Ruby and well done (especially as a litteral) that it’s usually the first choice as a collection. But sometimes we need to avoid duplicates, and we end to duplicate a lot of checks to do that. The post explains that use case and suggests a solution..
Post a comment