package containers

  1. Overview
  2. Docs
A modular, clean and powerful extension of the OCaml standard library

Install

Dune Dependency

Authors

Maintainers

Sources

v3.3.tar.gz
md5=aa946f452a156b7cd0b932b5a849b44e
sha512=fbb6e519ea918afd3895de4cb74bb93a1d7d8899aa1d9def0ee0576a4f648413e3a7d9639040a1117516efb74c66c3432e6da79e6284d2315327175e22766717

doc/containers/CCEqual/index.html

Module CCEqualSource

Equality Combinators

  • since 1.2
Sourcetype 'a t = 'a -> 'a -> bool

Equality function. Must be transitive, symmetric, and reflexive.

Sourceval poly : 'a t

Standard polymorphic equality.

Sourceval physical : 'a t

Standard physical equality.

  • since 2.0
Sourceval int : int t
Sourceval string : string t
Sourceval bool : bool t
Sourceval float : float t
Sourceval unit : unit t
Sourceval list : 'a t -> 'a list t
Sourceval array : 'a t -> 'a array t
Sourceval option : 'a t -> 'a option t
Sourceval pair : 'a t -> 'b t -> ('a * 'b) t
Sourceval triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
Sourceval map : ('a -> 'b) -> 'b t -> 'a t

map f eq is the equality function that, given objects x and y, projects x and y using f (e.g. using a record field) and then compares those projections with eq. Example: map fst int compares values of type (int * 'a) by their first component.

Sourceval always_eq : _ t

Always returns true. All values are equal.

  • since 3.0
Sourceval never_eq : _ t

Always returns false. No values are, so this is not even reflexive (i.e. x=x is false). Be careful!

  • since 3.0
Sourcemodule Infix : sig ... end
include module type of Infix
Sourceval (>|=) : 'b t -> ('a -> 'b) -> 'a t

Infix equivalent of map.

OCaml

Innovation. Community. Security.