mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -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)
|
||||
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
|
||||
|
||||
module Monad(X : sig type t end) = struct
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue