mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-09 12:45:34 -05:00
merge from master
This commit is contained in:
commit
c2a2e9e0a5
3 changed files with 9 additions and 4 deletions
|
|
@ -52,8 +52,8 @@ structures comprise (some modules in `misc/`, some other in `core/`):
|
|||
- `CCPersistentHashtbl`, a semi-persistent hashtable (similar to [persistent arrays](https://www.lri.fr/~filliatr/ftp/ocaml/ds/parray.ml.html))
|
||||
- `CCVector`, a growable array (pure OCaml, no C) with mutability annotations
|
||||
- `CCGen` and `CCSequence`, generic iterators structures (with structural types so they can be defined in several places). Now also in their own repository and opam packages (`gen` and `sequence`).
|
||||
- `CCKlist`, a persistent iterator structure (akin to a lazy list)
|
||||
- `CCList`, functions and lists including tail-recursive implementations of `map` and `append` and many other utilities
|
||||
- `CCKList`, a persistent iterator structure (akin to a lazy list)
|
||||
- `CCList`, functions on lists, including tail-recursive implementations of `map` and `append` and many other things
|
||||
- `CCArray`, utilities on arrays and slices
|
||||
- `CCLinq`, high-level query language over collections
|
||||
- `CCMultimap` and `CCMultiset`, functors defining persistent structures
|
||||
|
|
@ -62,14 +62,14 @@ structures comprise (some modules in `misc/`, some other in `core/`):
|
|||
- `CCInt`
|
||||
- `CCString` (basic string operations)
|
||||
- `CCPair` (cartesian products)
|
||||
- `CCOpt` (options)
|
||||
- `CCOpt` (options, very useful)
|
||||
- `CCFun` (function combinators)
|
||||
- `CCBool`
|
||||
- `CCOrd` (combinators for total orderings)
|
||||
- `CCRandom` (combinators for random generators)
|
||||
- `CCPrint` (printing combinators)
|
||||
- `CCHash` (hashing combinators)
|
||||
- `CCError` (monadic error handling)
|
||||
- `CCError` (monadic error handling, very useful)
|
||||
|
||||
### String
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ let flat_map f o = match o with
|
|||
| None -> None
|
||||
| Some x -> f x
|
||||
|
||||
let pure x = Some x
|
||||
|
||||
let (<*>) f x = match f, x with
|
||||
| None, _
|
||||
| _, None -> None
|
||||
|
|
|
|||
|
|
@ -68,6 +68,9 @@ val sequence_l : 'a t list -> 'a list t
|
|||
|
||||
(** {2 Applicative} *)
|
||||
|
||||
val pure : 'a -> 'a t
|
||||
(** Alias to {!return} *)
|
||||
|
||||
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
|
||||
|
||||
val (<$>) : ('a -> 'b) -> 'a t -> 'b t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue