class IndexSet
Fuck using an array with set, that’s just straight dumb and not efficient
def add(item)
def add(item) return if @hash.include?(item) @hash[item] = hash.size @hash end
def each(&block)
def each(&block) @hash.each_key(&block) end
def empty?
def empty? @hash.empty? end
def include?(item)
def include?(item) @hash.include?(item) end
def initialize
def initialize @hash = Hash.new end
def join(delimiter = '')
def join(delimiter = '') @hash.keys.join(delimiter) end
def length
def length @hash.size end
def to_a
def to_a @hash.dup end