diff --git a/src/core/CCFun.ml b/src/core/CCFun.ml index 141b26d0..242032a5 100644 --- a/src/core/CCFun.ml +++ b/src/core/CCFun.ml @@ -2,24 +2,18 @@ (** {1 Basic Functions} *) -[@@@ocaml.warning "-32"] - -let opaque_identity x = x - -[@@@ocaml.warning "+32"] - (* import standard implementations, if any *) include Sys include Stdlib include Fun -let compose f g x = g (f x) -let compose_binop f g x y = g (f x) (f y) -let curry f x y = f (x, y) -let uncurry f (x, y) = f x y +let[@inline] compose f g x = g (f x) +let[@inline] compose_binop f g x y = g (f x) (f y) +let[@inline] curry f x y = f (x, y) +let[@inline] uncurry f (x, y) = f x y -let tap f x = +let[@inline] tap f x = ignore (f x); x @@ -67,8 +61,6 @@ let rec iterate n f x = module Infix = struct (* default implem for some operators *) - let ( |> ) = Stdlib.( |> ) - let ( @@ ) = Stdlib.( @@ ) let ( %> ) = compose let[@inline] ( % ) f g x = f (g x) let ( let@ ) = ( @@ ) diff --git a/src/core/CCFun.mli b/src/core/CCFun.mli index a5cfeae5..5476b580 100644 --- a/src/core/CCFun.mli +++ b/src/core/CCFun.mli @@ -71,13 +71,6 @@ val iterate : int -> ('a -> 'a) -> 'a -> 'a Infix operators. *) module Infix : sig - val ( |> ) : 'a -> ('a -> 'b) -> 'b - (** [x |> f] is the same as [f x]. A 'pipe' operator. *) - - val ( @@ ) : ('a -> 'b) -> 'a -> 'b - (** [f @@ x] is the same as [f x], but right-associative. - @since 0.5 *) - val ( %> ) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c (** [(f %> g) x] or [(%>) f g x] is [g (f x)]. Alias to [compose]. *)