Method: Cantor::AbsoluteSet#first

Defined in:
lib/cantor/absolute_set.rb

#firstObject

Returns a single element from the set, with no guarantees about which element. If the set is #empty?, the return value is undefined.



43
44
45
46
47
48
49
# File 'lib/cantor/absolute_set.rb', line 43

def first
  @universe.each do |value, n|
    unless @mask[n].zero?
      return value
    end
  end
end