Endo API documentation
    Preparing search index...

    Type Alias PartialCompare<T>

    PartialCompare: (left: T, right: T) => PartialComparison

    A function that implements a partial order --- defining relative position between values but leaving some pairs incomparable (for example, subsets over sets is a partial order in which {} precedes {x} and {y}, which are mutually incomparable but both precede {x, y}). As with the rank ordering produced by RankCompare, -1, 0, and 1 respectively mean "less than", "equivalent to", and "greater than". NaN means "incomparable" --- the first value is not less, equivalent, or greater than the second.

    By using NaN for "incomparable", the normal equivalence for using the return value in a comparison is preserved. PartialCompare(left, right) >= 0 iff left is greater than or equivalent to right in the partial ordering.

    Type Parameters

    • T = any

    Type declaration