mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
prepare for 0.6
This commit is contained in:
parent
bbcb04b5a4
commit
16f160678d
8 changed files with 12 additions and 12 deletions
2
_oasis
2
_oasis
|
|
@ -1,6 +1,6 @@
|
||||||
OASISFormat: 0.4
|
OASISFormat: 0.4
|
||||||
Name: containers
|
Name: containers
|
||||||
Version: dev
|
Version: 0.6
|
||||||
Homepage: https://github.com/c-cube/ocaml-containers
|
Homepage: https://github.com/c-cube/ocaml-containers
|
||||||
Authors: Simon Cruanes
|
Authors: Simon Cruanes
|
||||||
License: BSD-2-clause
|
License: BSD-2-clause
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
Particularly useful for memoization. See {!with_cache} and {!with_cache_rec}
|
Particularly useful for memoization. See {!with_cache} and {!with_cache_rec}
|
||||||
for more details.
|
for more details.
|
||||||
@since NEXT_RELEASE *)
|
@since 0.6 *)
|
||||||
|
|
||||||
type 'a equal = 'a -> 'a -> bool
|
type 'a equal = 'a -> 'a -> bool
|
||||||
type 'a hash = 'a -> int
|
type 'a hash = 'a -> int
|
||||||
|
|
@ -46,7 +46,7 @@ f' 1;; (* prints *)
|
||||||
f' 0;; (* doesn't print, returns cached value *)
|
f' 0;; (* doesn't print, returns cached value *)
|
||||||
]}
|
]}
|
||||||
|
|
||||||
@since NEXT_RELEASE *)
|
@since 0.6 *)
|
||||||
|
|
||||||
type ('a, 'b) t
|
type ('a, 'b) t
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ val compose_binop : ('a -> 'b) -> ('b -> 'b -> 'c) -> 'a -> 'a -> 'c
|
||||||
(** [compose_binop f g] is [fun x y -> g (f x) (f y)]
|
(** [compose_binop f g] is [fun x y -> g (f x) (f y)]
|
||||||
Example (partial order):
|
Example (partial order):
|
||||||
[List.sort (compose_binop fst CCInt.compare) [1, true; 2, false; 1, false]]
|
[List.sort (compose_binop fst CCInt.compare) [1, true; 2, false; 1, false]]
|
||||||
@since NEXT_RELEASE*)
|
@since 0.6*)
|
||||||
|
|
||||||
val (%>) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c
|
val (%>) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c
|
||||||
(** Alias to [compose] *)
|
(** Alias to [compose] *)
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ way. For advanced IO tasks, the user is advised to use something
|
||||||
like Lwt or Async, that are far more comprehensive.
|
like Lwt or Async, that are far more comprehensive.
|
||||||
This module depends on {!CCGen}.
|
This module depends on {!CCGen}.
|
||||||
|
|
||||||
@since NEXT_RELEASE
|
@since 0.6
|
||||||
|
|
||||||
{b NOTE} this was formerly a monadic IO module. The old module is now
|
{b NOTE} this was formerly a monadic IO module. The old module is now
|
||||||
in [containers.advanced] under the name [CCMonadIO].
|
in [containers.advanced] under the name [CCMonadIO].
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ val fold_right : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b
|
||||||
|
|
||||||
val init : int -> (int -> 'a) -> 'a t
|
val init : int -> (int -> 'a) -> 'a t
|
||||||
(** Same as [Array.init]
|
(** Same as [Array.init]
|
||||||
@since NEXT_RELEASE *)
|
@since 0.6 *)
|
||||||
|
|
||||||
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
|
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,19 +48,19 @@ module type S = sig
|
||||||
val add_mult : t -> elt -> int -> t
|
val add_mult : t -> elt -> int -> t
|
||||||
(** [add_mult set x n] adds [n] occurrences of [x] to [set]
|
(** [add_mult set x n] adds [n] occurrences of [x] to [set]
|
||||||
@raise Invalid_argument if [n < 0]
|
@raise Invalid_argument if [n < 0]
|
||||||
@since NEXT_RELEASE *)
|
@since 0.6 *)
|
||||||
|
|
||||||
val remove_mult : t -> elt -> int -> t
|
val remove_mult : t -> elt -> int -> t
|
||||||
(** [remove_mult set x n] removes at most [n] occurrences of [x] from [set]
|
(** [remove_mult set x n] removes at most [n] occurrences of [x] from [set]
|
||||||
@raise Invalid_argument if [n < 0]
|
@raise Invalid_argument if [n < 0]
|
||||||
@since NEXT_RELEASE *)
|
@since 0.6 *)
|
||||||
|
|
||||||
val update : t -> elt -> (int -> int) -> t
|
val update : t -> elt -> (int -> int) -> t
|
||||||
(** [update set x f] calls [f n] where [n] is the current multiplicity
|
(** [update set x f] calls [f n] where [n] is the current multiplicity
|
||||||
of [x] in [set] ([0] to indicate its absence); the result of [f n]
|
of [x] in [set] ([0] to indicate its absence); the result of [f n]
|
||||||
is the new multiplicity of [x].
|
is the new multiplicity of [x].
|
||||||
@raise Invalid_argument if [f n < 0]
|
@raise Invalid_argument if [f n < 0]
|
||||||
@since NEXT_RELEASE *)
|
@since 0.6 *)
|
||||||
|
|
||||||
val min : t -> elt
|
val min : t -> elt
|
||||||
(** Minimal element w.r.t the total ordering on elements *)
|
(** Minimal element w.r.t the total ordering on elements *)
|
||||||
|
|
|
||||||
|
|
@ -101,12 +101,12 @@ val pop_exn : ('a, rw) t -> 'a
|
||||||
|
|
||||||
val top : ('a, _) t -> 'a option
|
val top : ('a, _) t -> 'a option
|
||||||
(** Top element, if present
|
(** Top element, if present
|
||||||
@since NEXT_RELEASE *)
|
@since 0.6 *)
|
||||||
|
|
||||||
val top_exn : ('a, _) t -> 'a
|
val top_exn : ('a, _) t -> 'a
|
||||||
(** Top element, if present
|
(** Top element, if present
|
||||||
@raise Failure on an empty vector
|
@raise Failure on an empty vector
|
||||||
@since NEXT_RELEASE *)
|
@since 0.6 *)
|
||||||
|
|
||||||
val copy : ('a,_) t -> ('a,'mut) t
|
val copy : ('a,_) t -> ('a,'mut) t
|
||||||
(** Shallow copy (may give an immutable or mutable vector) *)
|
(** Shallow copy (may give an immutable or mutable vector) *)
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ OUnit.assert_equal None (Mixtbl.get inj_int tbl "a");;
|
||||||
OUnit.assert_equal (Some "Bye") (Mixtbl.get inj_string tbl "a");;
|
OUnit.assert_equal (Some "Bye") (Mixtbl.get inj_string tbl "a");;
|
||||||
]}
|
]}
|
||||||
|
|
||||||
@since NEXT_RELEASE *)
|
@since 0.6 *)
|
||||||
|
|
||||||
type 'a t
|
type 'a t
|
||||||
(** A hash table containing values of different types.
|
(** A hash table containing values of different types.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue