diff --git a/src/core/CCFun.ml b/src/core/CCFun.ml index d70c00b7..65c9a5d5 100644 --- a/src/core/CCFun.ml +++ b/src/core/CCFun.ml @@ -77,11 +77,7 @@ struct type 'a t = X.t -> 'a let[@inline] return x _ = x - let[@inline] k_compose f g = - (fun x -> f x |> flat_map g) let[@inline] ( >|= ) f g x = g (f x) let[@inline] ( >>= ) f g x = g (f x) x - let[@inline] ( >=> ) = k_compose - let[@inline] ( <=< ) = flip k_compose end [@@inline] diff --git a/src/core/CCFun.mli b/src/core/CCFun.mli index fe2902f3..fa69904f 100644 --- a/src/core/CCFun.mli +++ b/src/core/CCFun.mli @@ -101,22 +101,14 @@ module Monad (X : sig type t end) : sig type 'a t = X.t -> 'a + (** Definition of a monad in continuation-passing style. *) val return : 'a -> 'a t (** Monadic [return]. *) - val k_compose : ('a -> 'b t) -> ('b -> 'c t) -> ('a -> 'c t) - (** Kleisli composition. Monadic equivalent of [compose]. *) - val ( >|= ) : 'a t -> ('a -> 'b) -> 'b t (** Monadic [map]. *) val ( >>= ) : 'a t -> ('a -> 'b t) -> 'b t (** Monadic [bind]. *) - - val ( >=> ) : ('a -> 'b t) -> ('b -> 'c t) -> ('a -> 'c t) - (** Monadic [k_compose]. *) - - val ( <=< ) : ('b -> 'c t) -> ('a -> 'b t) -> ('a -> 'c t) - (** Reverse monadic [k_compose]. *) end