package ocaml-base-compiler

  1. Overview
  2. Docs
Official release 4.09.0

Install

Dune Dependency

Authors

Maintainers

Sources

4.09.0.tar.gz
sha256=a7bc044167e7d09f8e3ea84b88ec9d81392908ecdac861d3d5015e5f0fc496a3
md5=76ac39570fc88b16fda2a94db7cd5cf3

doc/stdlib/Stdlib/Unit/index.html

Module Stdlib.Unit

Unit values.

  • since 4.08

The unit type

type t = unit =
  1. | ()
    (*

    The unit type.

    The constructor () is included here so that it has a path, but it is not intended to be used in user-defined data types.

    *)
val equal : t -> t -> bool

equal u1 u2 is true.

val compare : t -> t -> int

compare u1 u2 is 0.

val to_string : t -> string

to_string b is "()".

OCaml

Innovation. Community. Security.

On This Page
  1. The unit type