mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
Merge pull request #33 from struktured/master
infix map operators for CCArray
This commit is contained in:
commit
5e9c071947
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 = 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 for_all p a = _for_all p a 0 (Array.length a)
|
||||||
|
|
||||||
let exists p a = _exists 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
|
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
|
||||||
(** Infix version of {!flat_map} *)
|
(** 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
|
val except_idx : 'a t -> int -> 'a list
|
||||||
(** Remove given index, obtaining the list of the other elements *)
|
(** Remove given index, obtaining the list of the other elements *)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue