mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
and_p -> and_pred, or_p -> or_pred
This commit is contained in:
parent
1dc046c6e9
commit
c6cb572230
2 changed files with 5 additions and 4 deletions
|
|
@ -8,10 +8,11 @@ include Sys
|
|||
include Stdlib
|
||||
include Fun
|
||||
|
||||
let[@inline] and_p f g x = f x && g x
|
||||
let[@inline] or_p f g x = f x || g x
|
||||
let[@inline] and_pred f g x = f x && g x
|
||||
let[@inline] or_pred f g x = f x || g x
|
||||
let[@inline] compose f g x = g (f x)
|
||||
let[@inline] compose_binop f g x y = g (f x) (f y)
|
||||
|
||||
let[@inline] curry f x y = f (x, y)
|
||||
let[@inline] uncurry f (x, y) = f x y
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
include module type of Fun
|
||||
(** @inline *)
|
||||
|
||||
val and_p : ('a -> bool) -> ('a -> bool) -> 'a -> bool
|
||||
val and_pred : ('a -> bool) -> ('a -> bool) -> 'a -> bool
|
||||
(** [and_p f g x] is [(f x) && (g x)].
|
||||
Produces a predicate which is a conjunction of the two predicates.
|
||||
*)
|
||||
|
||||
val or_p : ('a -> bool) -> ('a -> bool) -> 'a -> bool
|
||||
val or_pred : ('a -> bool) -> ('a -> bool) -> 'a -> bool
|
||||
(** [or_p f g x] is [(f x) || (g x)].
|
||||
Produces a predicate which is a disjunction of the two predicates.
|
||||
*)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue