• OCaml logo OCaml logo
  • Learn
  • Packages
  • Community
  • Blog
  • Playground
  • Learn
  • Packages
  • Community
  • Blog
  • Playground
  • Get started
  • preface
  • Documentation
  • preface.specs lib
  • Preface_specs .Monad .CORE Module type
package preface
  • preface
    • Preface
  • preface.core
    • Preface_core
      • Fun
        • Infix
      • Monoid
      • Nonempty_list
      • Shims
        • Either
      • Void
  • preface.make
    • Preface_make
      • Alt
        • Composition
          • 1-F
            • Infix
          • 2-G
            • Infix
          • Infix
        • Core
          • 1-Req
        • Core_over_functor
          • 1-Functor
            • Infix
          • 2-Req
        • Infix
          • 1-Core
          • 2-Operation
        • Operation
          • 1-Core
        • Over_functor
          • 1-Functor
            • Infix
          • 2-Combine
          • Infix
        • Product
          • 1-F
            • Infix
          • 2-G
            • Infix
          • Infix
        • Via
          • 1-Core
          • 2-Operation
          • 3-Infix
          • Infix
        • Via_map_and_combine
          • 1-Req
          • Infix
      • Alternative
        • Composition
          • 1-F
            • Infix
            • Syntax
          • 2-G
            • Infix
            • Syntax
          • Infix
          • Syntax
        • Core_via_pure_and_apply
          • 1-Req
        • Core_via_pure_and_lift2
          • 1-Req
        • Core_via_pure_map_and_product
          • 1-Req
        • From_arrow_plus
          • 1-A
            • Infix
          • Infix
          • Syntax
        • Infix
          • 1-Core
          • 2-Operation
        • Operation
          • 1-Core
        • Over_applicative
          • 1-Applicative
            • Infix
            • Syntax
          • 2-Req
          • Infix
          • Syntax
        • Product
          • 1-F
            • Infix
            • Syntax
          • 2-G
            • Infix
            • Syntax
          • Infix
          • Syntax
        • Syntax
          • 1-Core
        • Via
          • 1-Core
          • 2-Operation
          • 3-Infix
          • 4-Syntax
          • Infix
          • Syntax
        • Via_pure_and_apply
          • 1-Req
          • Infix
          • Syntax
        • Via_pure_and_lift2
          • 1-Req
          • Infix
          • Syntax
        • Via_pure_map_and_product
          • 1-Req
          • Infix
          • Syntax
      • Applicative
        • Composition
          • 1-F
            • Infix
            • Syntax
          • 2-G
            • Infix
            • Syntax
          • Infix
          • Syntax
        • Const
          • 1-M
          • Infix
          • Syntax
        • Core_via_pure_and_apply
          • 1-Req
        • Core_via_pure_and_lift2
          • 1-Req
        • Core_via_pure_map_and_product
          • 1-Req
        • From_alternative
          • 1-Alternative
            • Infix
            • Syntax
          • Infix
          • Syntax
        • From_arrow
          • 1-A
            • Infix
          • Infix
          • Syntax
        • From_monad
          • 1-Monad
            • Infix
            • Syntax
          • Infix
          • Syntax
        • Infix
          • 1-Core
          • 2-Operation
        • Operation
          • 1-Core
        • Over_apply
          • 1-Apply
            • Infix
            • Syntax
          • 2-Req
          • Infix
          • Syntax
        • Product
          • 1-F
            • Infix
            • Syntax
          • 2-G
            • Infix
            • Syntax
          • Infix
          • Syntax
        • Syntax
          • 1-Core
        • Via
          • 1-Core
          • 2-Operation
          • 3-Infix
          • 4-Syntax
          • Infix
          • Syntax
        • Via_pure_and_apply
          • 1-Req
          • Infix
          • Syntax
        • Via_pure_and_lift2
          • 1-Req
          • Infix
          • Syntax
        • Via_pure_map_and_product
          • 1-Req
          • Infix
          • Syntax
      • Arrow
        • Alias
          • 1-Operation
        • Core_over_category_and_via_arrow_and_fst
          • 1-Category
          • 2-Req
        • Core_over_category_and_via_arrow_and_split
          • 1-Category
          • 2-Req
        • From_arrow_alt
          • 1-Alt
            • Infix
          • Infix
        • From_arrow_apply
          • 1-Apply
            • Infix
          • Infix
        • From_arrow_choice
          • 1-Choice
            • Infix
          • Infix
        • From_arrow_plus
          • 1-Plus
            • Infix
          • Infix
        • From_arrow_zero
          • 1-Zero
            • Infix
          • Infix
        • From_monad
          • 1-Monad
          • Infix
        • From_strong_and_category
          • 1-Strong
          • 2-Category
            • Infix
          • Infix
        • Infix_over_category
          • 1-Category
          • 2-Core
          • 3-Operation
        • Operation_over_category
          • 1-Category
          • 2-Core
        • Over_category_and_via_arrow_and_fst
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Over_category_and_via_arrow_and_split
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Product
          • 1-F
            • Infix
          • 2-G
            • Infix
          • Infix
        • Via
          • 1-Core
          • 2-Operation
          • 3-Alias
          • 4-Infix
          • Infix
      • Arrow_alt
        • Alias
          • 1-Operation
        • Core_over_category_and_via_arrow_and_fst
          • 1-Category
          • 2-Req
        • Core_over_category_and_via_arrow_and_split
          • 1-Category
          • 2-Req
        • From_arrow_plus
          • 1-Plus
            • Infix
          • Infix
        • From_monad_plus
          • 1-Monad
          • Infix
        • Infix_over_category
          • 1-Category
          • 2-Core
          • 3-Operation
        • Operation_over_category
          • 1-Category
          • 2-Core
        • Over_arrow
          • 1-Arrow
            • Infix
          • 2-Req
          • Infix
        • Over_category_and_via_arrow_and_fst
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Over_category_and_via_arrow_and_split
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Product
          • 1-F
            • Infix
          • 2-G
            • Infix
          • Infix
        • Via
          • 1-Core
          • 2-Operation
          • 3-Alias
          • 4-Infix
          • Infix
      • Arrow_apply
        • Alias
          • 1-Operation
        • Core_over_category_and_via_arrow_and_fst
          • 1-Category
          • 2-Req
        • Core_over_category_and_via_arrow_and_split
          • 1-Category
          • 2-Req
        • From_monad
          • 1-Monad
          • Infix
        • Infix_over_category
          • 1-Category
          • 2-Core
          • 3-Operation
        • Operation_over_category
          • 1-Category
          • 2-Core
        • Over_arrow
          • 1-Arrow
            • Infix
          • 2-Apply
          • Infix
        • Over_category_and_via_arrow_and_fst
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Over_category_and_via_arrow_and_split
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Via
          • 1-Core
          • 2-Operation
          • 3-Alias
          • 4-Infix
          • Infix
      • Arrow_choice
        • Alias
          • 1-Operation
        • Core_over_category_and_via_arrow_and_fst_and_choose
          • 1-Category
          • 2-Req
        • Core_over_category_and_via_arrow_and_fst_and_left
          • 1-Category
          • 2-Req
        • Core_over_category_and_via_arrow_and_split_and_choose
          • 1-Category
          • 2-Req
        • Core_over_category_and_via_arrow_and_split_and_left
          • 1-Category
          • 2-Req
        • From_monad
          • 1-Monad
          • Infix
        • Infix_over_category
          • 1-Category
          • 2-Core
          • 3-Operation
        • Operation_over_category
          • 1-Category
          • 2-Core
        • Over_arrow_with_choose
          • 1-Arrow
            • Infix
          • 2-Choose
          • Infix
        • Over_arrow_with_left
          • 1-Arrow
            • Infix
          • 2-Left
          • Infix
        • Over_arrow_with_left_and_choose
          • 1-Arrow
            • Infix
          • 2-Choose_left
          • Infix
        • Over_category_and_via_arrow_and_fst_and_choose
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Over_category_and_via_arrow_and_fst_and_left
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Over_category_and_via_arrow_and_split_and_choose
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Over_over_category_and_via_arrow_and_split_and_left
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Product
          • 1-F
            • Infix
          • 2-G
            • Infix
          • Infix
        • Via
          • 1-Core
          • 2-Operation
          • 3-Alias
          • 4-Infix
          • Infix
      • Arrow_plus
        • Alias
          • 1-Operation
        • Core_over_category_and_via_arrow_and_fst
          • 1-Category
          • 2-Req
        • Core_over_category_and_via_arrow_and_split
          • 1-Category
          • 2-Req
        • From_monad_plus
          • 1-Monad
          • Infix
        • Infix_over_category
          • 1-Category
          • 2-Core
          • 3-Operation
        • Operation_over_category
          • 1-Category
          • 2-Core
        • Over_arrow
          • 1-Arrow
            • Infix
          • 2-Req
          • Infix
        • Over_category_and_via_arrow_and_fst
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Over_category_and_via_arrow_and_split
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Product
          • 1-F
            • Infix
          • 2-G
            • Infix
          • Infix
        • Via
          • 1-Core
          • 2-Operation
          • 3-Alias
          • 4-Infix
          • Infix
      • Arrow_zero
        • Alias
          • 1-Operation
        • Core_over_category_and_via_arrow_and_fst
          • 1-Category
          • 2-Req
        • Core_over_category_and_via_arrow_and_split
          • 1-Category
          • 2-Req
        • From_arrow_plus
          • 1-Plus
            • Infix
          • Infix
        • From_monad_plus
          • 1-Monad
          • Infix
        • Infix_over_category
          • 1-Category
          • 2-Core
          • 3-Operation
        • Operation_over_category
          • 1-Category
          • 2-Core
        • Over_arrow
          • 1-Arrow
            • Infix
          • 2-Req
          • Infix
        • Over_category_and_via_arrow_and_fst
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Over_category_and_via_arrow_and_split
          • 1-Category
            • Infix
          • 2-Req
          • Infix
        • Product
          • 1-F
            • Infix
          • 2-G
            • Infix
          • Infix
        • Via
          • 1-Core
          • 2-Operation
          • 3-Alias
          • 4-Infix
          • Infix
      • Bifunctor
        • Core_via_bimap
          • 1-Req
        • Core_via_map_fst_and_map_snd
          • 1-Req
        • From_functor
          • 1-F
        • From_functors_product
          • 1-F
            • Infix
          • 2-G
            • Infix
        • From_functors_sum
          • 1-F
            • Infix
          • 2-G
            • Infix
        • Operation
          • 1-Core
        • Product
          • 1-F
          • 2-G
        • Sum
          • 1-F
          • 2-G
        • Via
          • 1-Core
          • 2-Operation
        • Via_bimap
          • 1-Req
        • Via_map_fst_and_map_snd
          • 1-Req
      • Category
        • Core
          • 1-Req
        • From_monad
          • 1-Monad
          • Infix
        • Infix
          • 1-Core
        • Operation
          • 1-Core
        • Over_semigroupoid
          • 1-G
          • 2-Req
          • Infix
        • Product
          • 1-F
            • Infix
          • 2-G
            • Infix
          • Infix
        • Via
          • 1-Core
          • 2-Operation
          • 3-Infix
          • Infix
        • Via_id_and_compose
          • 1-Req
          • Infix
      • Choice
        • Composition
          • 1-F
          • 2-G
        • From_applicative
          • 1-Applicative
        • Over_profunctor_via_left
          • 1-P
          • 2-L
        • Over_profunctor_via_right
          • 1-P
          • 2-R
        • Via_contramap_fst_and_map_snd_and_left
          • 1-Req
        • Via_contramap_fst_and_map_snd_and_right
          • 1-Req
        • Via_dimap_and_left
          • 1-Req
        • Via_dimap_and_right
          • 1-Req
      • Closed
        • Composition
          • 1-F
          • 2-G
        • Core_via_contramap_fst_and_map_snd_and_closed
          • 1-Req
        • Core_via_dimap_and_closed
          • 1-Req
        • Operation
          • 1-Core
        • Over_profunctor_via_closed
          • 1-P
          • 2-C
        • Via
          • 1-Core
          • 2-Operation
        • Via_contramap_fst_and_map_snd_and_closed
          • 1-Req
        • Via_dimap_and_closed
          • 1-Req
      • Clown
        • To_bifunctor
          • 1-F
        • To_profunctor
          • 1-F
      • Cokleisli
        • Arrow
          • 1-C
          • Infix
        • Bifunctor
          • 1-C
        • Category
          • 1-C
          • Infix
        • Closed
          • 1-F
        • Profunctor
          • 1-F
        • Strong
          • 1-C
      • Comonad
        • Core_via_cokleisli_composition
          • 1-Req
        • Core_via_extend
          • 1-Req
        • Core_via_map_and_duplicate
          • 1-Req
        • Infix
          • 1-Core
          • 2-Operation
        • Operation
          • 1-Core
        • Syntax
          • 1-Core
        • Via
          • 1-Core
          • 2-Operation
          • 3-Syntax
          • 4-Infix
          • Infix
          • Syntax
        • Via_cokleisli_composition
          • 1-Req
          • Infix
          • Syntax
        • Via_extend
          • 1-Req
          • Infix
          • Syntax
        • Via_map_and_duplicate
          • 1-Req
          • Infix
          • Syntax
      • Contravariant
        • Composition
          • 1-F
            • Infix
          • 2-G
            • Infix
          • Infix
        • Core
          • 1-Req
        • Infix
          • 1-Core
          • 2-Operation
        • Operation
          • 1-Core
        • Via
          • 1-Core
          • 2-Operation
          • 3-Infix
          • Infix
        • Via_contramap
          • 1-Req
          • Infix
      • Decidable
        • Core_via_contramap_and_divide_and_conquer
          • 1-Divisible_req
          • 2-Req
        • Core_via_divide_and_conquer
          • 1-Divisible_req
          • 2-Req
        • Infix
          • 1-Core
          • 2-Operation
        • Operation
          • 1-Core
        • Over_divisible
          • 1-Divisible
          • 2-Req
          • Infix
        • Via
          • 1-Core
          • 2-Operation
          • 3-Infix
          • Infix
        • Via_contramap_and_divide_and_conquer
          • 1-Divisible_req
          • 2-Req
          • Infix
        • Via_divide_and_conquer
          • 1-Divisible_req
          • 2-Req
          • Infix
      • Divisible
        • Core_via_contramap_and_divide_and_conquer
          • 1-Req
        • Core_via_divide_and_conquer
          • 1-Req
        • Infix
          • 1-Core
          • 2-Operation
        • Operation
          • 1-Core
        • Over_contravariant
          • 1-Contravariant
          • 2-Req
          • Infix
        • Via
          • 1-Core
          • 2-Operation
          • 3-Infix
          • Infix
        • Via_contramap_and_divide_and_conquer
          • 1-Req
          • Infix
        • Via_divide_and_conquer
          • 1-Req
          • Infix
      • Env
        • Applicative
          • 1-A
            • Infix
            • Syntax
          • 2-Env
            • Infix
          • Infix
          • Syntax
        • Comonad
          • 1-C
            • Infix
            • Syntax
          • 2-Env
          • Infix
          • Syntax
        • Core_over_comonad
          • 1-C
            • Infix
            • Syntax
          • 2-Env
          • Local
            • 1-Env
        • Functor
          • 1-F
            • Infix
          • 2-Env
          • Infix
        • Over_comonad
          • 1-C
            • Infix
            • Syntax
          • 2-Env
          • Comonad
            • Infix
            • Syntax
          • Infix
          • Local
            • 1-Env
          • Syntax
      • Foldable
        • Composition
          • 1-F
          • 2-G
        • Core_via_fold_map
          • 1-Req
        • Core_via_fold_right
          • 1-Req
        • Operation
          • 1-C
        • Product
          • 1-F
          • 2-G
        • Sum
          • 1-F
          • 2-G
        • Via
          • 1-C
          • 2-O
        • Via_fold_map
          • 1-Req
        • Via_fold_right
          • 1-Req
      • Free_applicative
        • Over_applicative
          • 1-A
          • Infix
          • Syntax
          • To_applicative
            • 1-Applicative
          • To_monoid
            • 1-Monoid
        • Over_functor
          • 1-F
          • Infix
          • Syntax
          • To_applicative
            • 1-Applicative
          • To_monoid
            • 1-Monoid
      • Free_monad
        • Over_applicative
          • 1-F
            • Infix
            • Syntax
          • Applicative
            • Infix
            • Syntax
          • Functor
            • Infix
          • Infix
          • Monad
            • Infix
            • Syntax
          • Selective
            • Infix
            • Syntax
          • Syntax
          • To_monad
            • 1-Monad
        • Over_functor
          • 1-F
            • Infix
          • Applicative
            • Infix
            • Syntax
          • Functor
            • Infix
          • Infix
          • Monad
            • Infix
            • Syntax
          • Selective
            • Infix
            • Syntax
          • Syntax
          • To_monad
            • 1-Monad
        • Over_monad
          • 1-F
            • Infix
            • Syntax
          • Applicative
            • Infix
            • Syntax
          • Functor
            • Infix
          • Infix
          • Monad
            • Infix
            • Syntax
          • Selective
            • Infix
            • Syntax
          • Syntax
          • To_monad
            • 1-Monad
        • Over_selective
          • 1-F
            • Infix
            • Syntax
          • Applicative
            • Infix
            • Syntax
          • Functor
            • Infix
          • Infix
          • Monad
            • Infix
            • Syntax
          • Selective
            • Infix
            • Syntax
          • Syntax
          • To_monad
            • 1-Monad
      • Free_selective
        • Over_applicative
          • 1-F
          • Infix
          • Syntax
          • To_monoid
            • 1-Monoid
          • To_selective
            • 1-Selective
        • Over_functor
          • 1-F
          • Infix
          • Syntax
          • To_monoid
            • 1-Monoid
          • To_selective
            • 1-Selective
        • Over_selective
          • 1-F
          • Infix
          • Syntax
          • To_monoid
            • 1-Monoid
          • To_selective
            • 1-Selective
      • Freer_monad
        • Over
          • 1-T
          • Applicative
            • Infix
            • Syntax
          • Functor
            • Infix
          • Infix
          • Monad
            • Infix
            • Syntax
          • Selective
            • Infix
            • Syntax
          • Syntax
          • To_monad
            • 1-Monad
      • Freer_selective
        • Over
          • 1-T
          • Infix
          • Syntax
          • To_monoid
            • 1-Monoid
          • To_selective
            • 1-Selective
              • Infix
              • Syntax
        • Over_selective
          • 1-F
            • Infix
            • Syntax
          • Infix
          • Syntax
          • To_monoid
            • 1-Monoid
          • To_selective
            • 1-Selective
              • Infix
              • Syntax
      • Functor
        • Composition
          • 1-F
            • Infix
          • 2-G
            • Infix
          • Infix
        • Core
          • 1-Req
        • From_alt
          • 1-Alt
            • Infix
          • Infix
        • From_alternative
          • 1-Alternative
            • Infix
            • Syntax
          • Infix
        • From_applicative
          • 1-Applicative
            • Infix
            • Syntax
          • Infix
        • From_arrow
          • 1-A
            • Infix
          • Infix
        • From_bifunctor
          • 1-Bifunctor
          • Infix
        • From_comonad
          • 1-Comonad
            • Infix
            • Syntax
          • Infix
        • From_monad
          • 1-Monad
            • Infix
            • Syntax
          • Infix
        • From_monad_plus
          • 1-Monad_plus
            • Infix
            • Syntax
          • Infix
        • Infix
          • 1-Core
          • 2-Operation
        • Operation
          • 1-Core
        • Product
          • 1-F
            • Infix
          • 2-G
            • Infix
          • Infix
        • Sum
          • 1-F
            • Infix
          • 2-G
            • Infix
          • Infix
        • Via
          • 1-Core
          • 2-Operation
          • 3-Infix
          • Infix
        • Via_map
          • 1-Req
          • Infix
      • Invariant
        • From_contravariant
          • 1-F
        • From_functor
          • 1-F
        • Via_invmap
          • 1-Req
      • Join
        • Functor
          • 1-B
          • Infix
      • Joker
        • To_bifunctor
          • 1-F
        • To_profunctor
          • 1-F
      • Kleisli
        • Arrow
          • 1-Monad
          • Infix
        • Arrow_alt
          • 1-Monad
          • Infix
        • Arrow_choice
          • 1-Monad
          • Infix
        • Arrow_plus
          • 1-Monad
          • Infix
        • Arrow_zero
          • 1-Monad
          • Infix
        • Category
          • 1-Monad
          • Infix
        • Choice
          • 1-Applicative
        • Profunctor
          • 1-Functor
        • Strong
          • 1-Monad
      • Monad
        • Core_via_return_and_bind
          • 1-Req
        • Core_via_return_and_kleisli_composition
          • 1-Req
        • Core_via_return_map_and_join
          • 1-Req
        • From_arrow_apply
          • 1-A
            • Infix
          • Infix
          • Syntax
        • From_monad_plus
          • 1-Monad_plus
            • Infix
            • Syntax
          • Infix
          • Syntax
        • Infix
          • 1-Core