Options
All
  • Public
  • Public/Protected
  • All
Menu

Type class laws defined for Eq.

Even though in TypeScript the Funfix library is using classes to express these laws, when implementing this class it is recommended that you implement it as a mixin using implements, instead of extending it directly with extends. See TypeScript: Mixins for details and note that we already have applyMixins defined.

We are doing this in order to support multiple inheritance and to avoid inheriting any static members. In the Flow definitions (e.g. .js.flow files) for Funfix these classes are defined with interface, as they are meant to be interfaces that sometimes have default implementations and not classes.

Type parameters

  • A

Hierarchy

  • EqLaws

Index

Properties

Methods

Properties

F

F: Eq<A>

The Eq designated instance for F, to be tested.

Methods

reflexive

  • reflexive(a: A): boolean
  • Equality is reflexive, i.e.

    a == a
    

    Parameters

    • a: A

    Returns boolean

symmetric

  • symmetric(x: A, y: A): boolean
  • Equality is symmetric, i.e.

    x == y <-> y == x
    

    Parameters

    • x: A
    • y: A

    Returns boolean

transitive

  • transitive(x: A, y: A, z: A): boolean
  • Equality is transitive, i.e.

    x == y && y == z -> x == z
    

    Parameters

    • x: A
    • y: A
    • z: A

    Returns boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc