mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-07 11:45:31 -05:00
feat(CCFun): add (|||>)
This commit is contained in:
parent
2a21181580
commit
6a70c57253
2 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue