Module Dunolint.TrilangSource

Sourcetype t =
  1. | True
  2. | False
  3. | Undefined
Sourceval equal : t -> t -> bool
Sourceval compare : t -> t -> int
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval all : t list
Sourceval const : bool -> t
Sourceval eval : 'a Blang.t -> f:('a -> t) -> t
Sourceval disjunction : t list -> t

If there exists a True value, that is the returned value for the list. Otherwise, this requires all values to be False to return false, and is Undefined in the remaining cases. This returns false on an empty list.

Sourceval exists : 'a list -> f:('a -> t) -> t

Same as disjunction but applies a f function to the elements of the input list as the values are needed. If there exists a True value, that is the returned value for the list. Otherwise, this requires all values to be False to return false, and is Undefined in the remaining cases.

The function f is called on the elements of the input list from left to right. If the result of the evaluation is determined before visiting the end of the input, f won't be called on the remaining values. Such case happens when f returns True for one of the elements.

Sourceval conjunction : t list -> t

If there exists a False value, that is the returned value for the list. Otherwise, this requires all values to be True to return true, and is Undefined in the remaining cases. This returns true on an empty list.

Sourceval for_all : 'a list -> f:('a -> t) -> t

Same as conjunction but builds the input by applying a f function on a list of input.

The function f is called on the elements of the input list from left to right. If the result of the evaluation is determined before visiting the end of the input, f won't be called on the remaining values. Such case happens when f returns False for one of the elements.

Sourcemodule Private : sig ... end