feat(CCFun): add (|||>)

This commit is contained in:
Nicola Mometto 2024-04-11 14:53:58 +01:00
parent 2a21181580
commit 6a70c57253
2 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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