Preface_stdlib.Result
Implementation for Result.t
.
Result.t
is like Either.t
but it exist for semantic reasons. (Left
and Right
are not very specific on what are the valid and the invalid branch).
module Bifunctor : Preface_specs.BIFUNCTOR with type ('a, 'b) t = ('a, 'b) t
module Functor :
Preface_specs.INDEXED_FUNCTOR with type ('a, 'b) t = ('a, 'b) t
module Alt : Preface_specs.INDEXED_ALT with type ('a, 'b) t = ('a, 'b) t
module Applicative :
Preface_specs.INDEXED_APPLICATIVE with type ('a, 'b) t = ('a, 'b) t
module Selective :
Preface_specs.INDEXED_SELECTIVE with type ('a, 'b) t = ('a, 'b) t
module Monad : Preface_specs.INDEXED_MONAD with type ('a, 'b) t = ('a, 'b) t
module Foldable :
Preface_specs.INDEXED_FOLDABLE with type ('a, 'b) t = ('a, 'b) t
module Mono (T : Preface_specs.Types.T0) : sig ... end
Additional functions to facilitate practical work with Result.t
.
val pure : 'a -> ('a, 'b) t
Create a value from 'b
to ('a, 'b) t
.
Equality between Result.t
.
val pp :
(Stdlib.Format.formatter -> 'a -> unit) ->
(Stdlib.Format.formatter -> 'b -> unit) ->
Stdlib.Format.formatter ->
('a, 'b) t ->
unit
Formatter for pretty-printing for Result.t
.