mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-05 19:00:31 -05:00
add cons_when to CCListLabels
This commit is contained in:
parent
4ff1853222
commit
fcd4d3f6ec
1 changed files with 5 additions and 0 deletions
|
|
@ -44,6 +44,11 @@ val cons_maybe : 'a option -> 'a t -> 'a t
|
|||
[cons_maybe None l] is [l].
|
||||
@since 0.13 *)
|
||||
|
||||
val cons_when : bool -> 'a -> 'a t -> 'a t
|
||||
(** [cons_when true x l] is [x :: l].
|
||||
[cons_when false x l] is [l].
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
val filter : f:('a -> bool) -> 'a t -> 'a t
|
||||
(** [filter ~f l] returns all the elements of the list [l]
|
||||
that satisfy the predicate [f]. The order of the elements
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue