Parameter Core_over_functor.Functor

Type

type 'a t

The type held by the Functor.

Type

Functions

val map : ('a -> 'b) -> 'a t -> 'b t

Mapping over t from 'a to 'b.

val replace : 'a -> 'b t -> 'a t

Create a new t, replacing all values of the given functor by given a value of 'a.

val void : 'a t -> unit t

Create a new t, replacing all values in the given functor by unit.

Infix operators

module Infix : Preface_specs.Indexed_functor.INFIX with type ('a, 'index) t := 'a t
val (<$>) : ('a -> 'b) -> 'a t -> 'b t

Infix version of CORE.map.

val (<&>) : 'a t -> ('a -> 'b) -> 'b t

Flipped and infix version of CORE.map.

val (<$) : 'a -> 'b t -> 'a t

Infix version of OPERATION.replace.

val ($>) : 'a t -> 'b -> 'b t

Flipped and infix version of OPERATION.replace.

Syntax operators

module Syntax : Preface_specs.Indexed_functor.SYNTAX with type ('a, 'index) t := 'a t
val let+ : 'a t -> ('a -> 'b) -> 'b t

let operator for mapping.