A pair is a collection of two objects of any kind. They are used among other things to represent Dict entries.

Mimics
Inactive cells
Active cells
Specs
Inactive cells (details)
kind = "Pair"
Active cells (details)
<=>(other)

compares this pair against the argument, returning -1, 0 or 1 based on which one is larger, first comparing the 'first', then comparing the 'second'

method(other, 
  result = self first <=>(other first) 
  if(result ==(0), 
    result = self second <=>(other second)) 
  result)
==(other)

returns true if the left hand side pair is equal to the right hand side pair.

===(other)

nil

method(other, 
  if(self same?(
      nil => nil), 
    Reflector other:mimics?(cell(:other), 
      nil => nil), 
    bind(rescue(Condition Error, fn(c, false)), 
      self ==(
        other))))
asTuple()

returns a tuple with the same content as this pair

method(
  tuple(first, second) 
  )
first()

Returns the first value

hash()

returns a hash for the pair

inspect()

Returns a text inspection of the object

key()

Returns the first value

notice()

Returns a brief text inspection of the object

second()

Returns the second value

value()

Returns the second value