mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-15 23:36:01 -05:00
CCFun: add infix tests
This commit is contained in:
parent
f7fbf8f054
commit
fee297247d
1 changed files with 7 additions and 0 deletions
|
|
@ -81,6 +81,13 @@ module Infix = struct
|
||||||
let (%) f g x = f (g x)
|
let (%) f g x = f (g x)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
(*$T
|
||||||
|
CCFun.((succ %> string_of_int) 2 = "3")
|
||||||
|
CCFun.((( * ) 3 % succ) 5 = 18)
|
||||||
|
CCFun.(succ @@ ( * ) 2 @@ pred @@ 3 = 5)
|
||||||
|
CCFun.(3 |> succ |> ( * ) 5 |> pred = 19)
|
||||||
|
*)
|
||||||
|
|
||||||
include Infix
|
include Infix
|
||||||
|
|
||||||
module Monad(X : sig type t end) = struct
|
module Monad(X : sig type t end) = struct
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue