package alg_structs

  1. Overview
  2. Docs

MakeUnlabeled makes an module instantiating S, with a labeled S.map, out of a module instantiating UnlabeledSeed with an unlabeled map function.

Parameters

Signature

include Seed with type 'a t = 'a Seed.t
type 'a t = 'a Seed.t

The principle type.

The type constructor t is the mapping of objects taking every type 'a to a type 'a t.

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

map ~f maps the function f : 'a -> 'b to a function 'f T : 'a T -> 'b T.

As an example, if T (x : u) : u t then map ~(f:u -> v) (T x) is T (f x) : v t. As a result, map is often thought of as applying f "in" T.

The function map is the mapping of arrows, taking every arrow 'a -> 'b to an arrow 'a t -> 'b t.

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

Infix for map

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

Mapped version of |> (which is flipped (<&>))

OCaml

Innovation. Community. Security.