package containers

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

Install

Dune Dependency

Authors

Maintainers

Sources

containers-3.15.tbz
sha256=92143ceb4785ae5f8a07f3ab4ab9f6f32d31ead0536e9be4fdb818dd3c677e58
sha512=5fa80189d0e177af2302b48e72b70299d51fc36ac2019e1cbf389ff6a7f4705b10089405b5a719b3e4845b0d1349a47a967f865dc2e4e3f0d5a0167ef6c31431

doc/containers/CCBool/index.html

Module CCBoolSource

Basic Bool functions

Sourcetype t = bool
Sourceval compare : t -> t -> int

compare b1 b2 is the total ordering on booleans b1 and b2, similar to Stdlib.compare.

Sourceval equal : t -> t -> bool

equal b1 b2 is true if b1 and b2 are the same.

Sourceval if_then : (unit -> 'a) -> t -> 'a option

if_then f x is Some (f ()) if x is true and None otherwise.

  • since 3.13
Sourceval if_then_else : (unit -> 'a) -> (unit -> 'a) -> t -> 'a

if_then_else f g x is f () if x is true and g () otherwise.

  • since 3.13
Sourceval to_int : t -> int

to_int true = 1, to_int false = 0.

  • since 2.7
Sourceval of_int : int -> t

of_int i is the same as i <> 0

  • since 2.7
Sourcetype 'a printer = Format.formatter -> 'a -> unit
Sourceval pp : t printer
OCaml

Innovation. Community. Security.