diff --git a/src/core/CCFun.ml b/src/core/CCFun.ml index b407d6a5..65c9a5d5 100644 --- a/src/core/CCFun.ml +++ b/src/core/CCFun.ml @@ -65,6 +65,7 @@ module Infix = struct let[@inline] ( % ) f g x = f (g x) let ( let@ ) = ( @@ ) let ( ||> ) (a, b) f = f a b + let ( |||> ) (a, b, c) f = f a b c end include Infix diff --git a/src/core/CCFun.mli b/src/core/CCFun.mli index 0536a734..f720a6cb 100644 --- a/src/core/CCFun.mli +++ b/src/core/CCFun.mli @@ -84,6 +84,9 @@ module Infix : sig val ( ||> ) : 'a * 'b -> ('a -> 'b -> 'c) -> 'c (** [x ||> f] is [f (fst x) (snd x)] *) + + val ( |||> ) : 'a * 'b * 'c -> ('a -> 'b -> 'c -> 'd) -> 'd + (** like [||>] but for tuples of size 3 *) end include module type of Infix