mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
infix map operators for CCArray
This commit is contained in:
parent
b3a38657d1
commit
83994f1f5e
2 changed files with 12 additions and 0 deletions
|
|
@ -392,6 +392,10 @@ let lookup ?(cmp=Pervasives.compare) k a =
|
|||
|
||||
let (>>=) a f = flat_map f a
|
||||
|
||||
let (>>|) a f = map f a
|
||||
|
||||
let (>|=) a f = map f a
|
||||
|
||||
let for_all p a = _for_all p a 0 (Array.length a)
|
||||
|
||||
let exists p a = _exists p a 0 (Array.length a)
|
||||
|
|
|
|||
|
|
@ -155,6 +155,14 @@ val flat_map : ('a -> 'b t) -> 'a t -> 'b array
|
|||
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
|
||||
(** Infix version of {!flat_map} *)
|
||||
|
||||
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
|
||||
(** Infix version of {!map}
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
|
||||
(** Infix version of {!map}
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
val except_idx : 'a t -> int -> 'a list
|
||||
(** Remove given index, obtaining the list of the other elements *)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue