Skip to content

Latest commit

 

History

History
36 lines (21 loc) · 713 Bytes

eq.md

File metadata and controls

36 lines (21 loc) · 713 Bytes

eq

module

Equatable

data Allows comparision of values for equality. Declare and pass a witness for custom equality.

In contrast to the default equality operator ==, you can define custom equality. If you explicitly want the strict behavior, pick the strict witness.

Properties

  • equal lhs, rhs

negated

func negated witness

Negates the result of the given Equatable.

pullback

func pullback transform, witness

Transforms the inputs of an Equatable-witness.

cmp.pullback { person => person.name }, insensitiveEquatable, Person "Somebody"