effect-ts-laws
    Preparing search index...

    Function testUnaryEquivalence

    • Attempt to find an example input where the pair of given unary functions is not equal. Given an arbitrary of A, an equivalence for B and a pair of functions, check the functions compute the same B given the same A, for numRuns values. Returns a boolean flag indicating equivalence.

      Type Parameters

      • A
      • B

      Parameters

      • a: Arbitrary<A>

        An arbitrary for the function argument type A.

      • equalsB: Equivalence<B>

        Equivalence for the function return value type B.

      • Optionalparameters: Parameters<A>

      Returns (self: (a: A) => B, that: (a: A) => B) => boolean

      True if no counterexample found, else false.

        • (self: (a: A) => B, that: (a: A) => B): boolean
        • Parameters

          • self: (a: A) => B

            First function to sample.

          • that: (a: A) => B

            Second function to sample.

          Returns boolean