mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
small details
This commit is contained in:
parent
8c9b5601a8
commit
6b62fce0ac
4 changed files with 15 additions and 9 deletions
|
|
@ -337,6 +337,6 @@ module File = struct
|
||||||
let show_walk_item (i,f) =
|
let show_walk_item (i,f) =
|
||||||
(match i with
|
(match i with
|
||||||
| `File -> "file:"
|
| `File -> "file:"
|
||||||
| `Dir -> "dir: "
|
| `Dir -> "dir:"
|
||||||
) ^ f
|
) ^ f
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ val read_all_bytes : ?size:int -> in_channel -> Bytes.t
|
||||||
@param size the internal buffer size
|
@param size the internal buffer size
|
||||||
@since 0.12 *)
|
@since 0.12 *)
|
||||||
|
|
||||||
(** {6 Output} *)
|
(** {2 Output} *)
|
||||||
|
|
||||||
val with_out : ?mode:int -> ?flags:open_flag list ->
|
val with_out : ?mode:int -> ?flags:open_flag list ->
|
||||||
string -> (out_channel -> 'a) -> 'a
|
string -> (out_channel -> 'a) -> 'a
|
||||||
|
|
@ -133,7 +133,7 @@ val tee : ('a -> unit) list -> 'a gen -> 'a gen
|
||||||
(** [tee funs gen] behaves like [gen], but each element is given to
|
(** [tee funs gen] behaves like [gen], but each element is given to
|
||||||
every function [f] in [funs] at the time the element is produced. *)
|
every function [f] in [funs] at the time the element is produced. *)
|
||||||
|
|
||||||
(** {6 File and file names}
|
(** {2 File and file names}
|
||||||
|
|
||||||
How to list recursively files in a directory:
|
How to list recursively files in a directory:
|
||||||
{[
|
{[
|
||||||
|
|
|
||||||
|
|
@ -227,27 +227,30 @@ end
|
||||||
|
|
||||||
module Set : sig
|
module Set : sig
|
||||||
val add : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t
|
val add : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t
|
||||||
(** [add x set] adds [x] to [set] if it was not already present
|
(** [add x set] adds [x] to [set] if it was not already present. Linear time.
|
||||||
@since 0.11 *)
|
@since 0.11 *)
|
||||||
|
|
||||||
val remove : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t
|
val remove : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t
|
||||||
(** [remove x set] removes one occurrence of [x] from [set]
|
(** [remove x set] removes one occurrence of [x] from [set]. Linear time.
|
||||||
@since 0.11 *)
|
@since 0.11 *)
|
||||||
|
|
||||||
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool
|
val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool
|
||||||
(** membership to the list *)
|
(** membership to the list. Linear time *)
|
||||||
|
|
||||||
val subset : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t -> bool
|
val subset : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t -> bool
|
||||||
(** test for inclusion *)
|
(** test for inclusion *)
|
||||||
|
|
||||||
val uniq : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t
|
val uniq : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t
|
||||||
(** list uniq: remove duplicates w.r.t the equality predicate *)
|
(** list uniq: remove duplicates w.r.t the equality predicate.
|
||||||
|
Complexity is quadratic in the length of the list, but the order
|
||||||
|
of elements is preserved. If you wish for a faster de-duplication
|
||||||
|
but do not care about the order, use {!sort_uniq}*)
|
||||||
|
|
||||||
val union : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t
|
val union : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t
|
||||||
(** list union *)
|
(** list union. Complexity is product of length of inputs. *)
|
||||||
|
|
||||||
val inter : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t
|
val inter : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t
|
||||||
(** list intersection *)
|
(** list intersection. Complexity is product of length of inputs., *)
|
||||||
end
|
end
|
||||||
|
|
||||||
(** {2 Other Constructors} *)
|
(** {2 Other Constructors} *)
|
||||||
|
|
|
||||||
|
|
@ -90,3 +90,6 @@ module String = struct
|
||||||
include CCString
|
include CCString
|
||||||
end
|
end
|
||||||
module Vector = CCVector
|
module Vector = CCVector
|
||||||
|
|
||||||
|
module Int64 = CCInt64
|
||||||
|
(** @since NEXT_RELEASE *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue