ord library
Classes
-
Monoid<A>
-
Monoid structure for Ord instances.
-
NumberOrd
-
Defines an order relation for numbers.
-
Ord<A>
-
Defines an order relation for type A.
-
Semigroup<A>
-
Semigroup structure for Ord instances.
Functions
-
between<T>(Ord<T> O)
→ bool Function(T) Function(T low, T hi)
-
Returns a function that checks if a value is within a given range.
-
clamp<T>(Ord<T> O)
→ T Function(T) Function(T low, T hi)
-
Returns a function that clamps a value within a given range.
-
contramap<A, B>(B f(A))
→ Ord<A> Function(Ord<B>)
-
Returns a contramap function that transforms an Ord instance based on function f.
-
fromCompare<T>(int compare(T first, T second))
→ Ord<T>
-
Creates a new Ord instance given a compare function.
-
getMonoid<A>()
→ BaseMonoid<Ord<A>>
-
Creates a new Monoid instance for Ord.
-
getSemigroup<A>()
→ BaseSemigroup<Ord<A>>
-
Creates a new Semigroup instance for Ord.
-
gt<A>(Ord<A> O)
→ bool Function(A first, A second)
-
Returns a function that checks if the first argument is greater than the second.
-
lt<A>(Ord<A> O)
→ bool Function(A first, A second)
-
Returns a function that checks if the first argument is less than the second.
-
max<A>(Ord<A> O)
→ A Function(A first, A second)
-
Returns a function that returns the maximum of two values.
-
min<A>(Ord<A> O)
→ A Function(A first, A second)
-
Returns a function that returns the minimum of two values.
-
reverse<A>(Ord<A> O)
→ Ord<A>
-
Returns a new Ord instance that reverses the order relation.