3.7. kink/EQ

Mod to prodive equality methods.

Usage:

:EQ.require_from('kink/')

:label <- {(:Str)
  new_val(
    ... Label_trait
    'Str' Str
  )
}

:Label_trait <- [
  ... EQ.trait{(:X :Y)
    X.str == Y.str
  }

  'str' {[:L]()
    L.Str
  }
]

stdout.print_line((label('Foo') == label('Foo')).repr) # => true
stdout.print_line((label('Foo') == label('Bar')).repr) # => false
stdout.print_line((label('Foo') != label('Foo')).repr) # => false
stdout.print_line((label('Foo') != label('Bar')).repr) # => true

3.7.1. EQ.trait($eq_fun)

Makes a trait of 'op_eq' and 'op_ne' methods, using $eq_fun.

$eq_fun takes two args, and retruns true if the args are equal, and returns false if the args are not equal.