mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
CCFun: add infix tests
This commit is contained in:
parent
6cfa7307de
commit
06b795c604
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