package preface

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

Implementation for List.t.

Type

type 'a t = 'a list

Implementation

Functor

module Functor : Preface_specs.FUNCTOR with type 'a t = 'a t

Applicative

List.t implements Preface_specs.APPLICATIVE and introduces an interface to define Preface_specs.TRAVERSABLE using List as an iterable structure.

Alternative

module Alternative : Preface_specs.ALTERNATIVE with type 'a t = 'a t

Selective

module Selective : Preface_specs.SELECTIVE with type 'a t = 'a t

Monad

List.t implements Preface_specs.MONAD and introduces an interface to define Preface_specs.TRAVERSABLE using List as an iterable structure.

Monad Plus

module Monad_plus : Preface_specs.MONAD_PLUS with type 'a t = 'a t

Foldable

module Foldable : Preface_specs.FOLDABLE with type 'a t = 'a t

Monoid

List is the Free monoid over a type so wrapping a Preface_specs.SEMIGROUP into an List gives us a Preface_specs.MONOID with empty list as a neutral element.

Addtional functions

Additional functions to facilitate practical work with List.t.

val pure : 'a -> 'a t

Create a value from 'a to 'a t.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

Equality between List.t.

val pp : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> unit

Formatter for pretty-printing for List.t.