package preface

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Implementation for Predicate.t.

A Predicate is just a function from 'a to bool.

Type

type 'a t = 'a -> bool

Implementation

Contravariant

module Contravariant : Preface_specs.CONTRAVARIANT with type 'a t = 'a t

Divisible

module Divisible : Preface_specs.DIVISIBLE with type 'a t = 'a t

Decidable

module Decidable : Preface_specs.DECIDABLE with type 'a t = 'a t

Invariant Functor

module Invariant : Preface_specs.INVARIANT with type 'a t = 'a t

Additional functions

Additional functions to facilitate practical work with Predicate.t.

val negate : 'a t -> 'a t

negate the predicate.

val tautology : 'a t

A predicate always true.

val contradiction : 'a t

A predicate always false.

val and_ : 'a t -> 'a t -> 'a t

Compose two predicates (using and).

val or_ : 'a t -> 'a t -> 'a t

Compose two predicates (using or).

infix operators

module Infix : sig ... end
val (&&) : 'a t -> 'a t -> 'a t

Compose two predicates (using and).

val (||) : 'a t -> 'a t -> 'a t

Compose two predicates (using or).

val (!) : 'a t -> 'a t

negate the predicate.

OCaml

Innovation. Community. Security.