doc: clarify CCOpt.filter

This commit is contained in:
Matt Bray 2021-03-19 11:42:41 +00:00 committed by Simon Cruanes
parent 0de515b94b
commit 0a54024143

View file

@ -60,8 +60,8 @@ val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
Fold on 0 or 1 element. *) Fold on 0 or 1 element. *)
val filter : ('a -> bool) -> 'a t -> 'a t val filter : ('a -> bool) -> 'a t -> 'a t
(** [filter f o] returns [Some x] if [f (Some x)] is [true], (** [filter f o] returns [Some x] if [o] is [Some x] and [f x] is [true],
or [None] if [f (Some x)] is [false] or if [o] is [None]. or [None] if [f x] is [false] or if [o] is [None].
Filter on 0 or 1 element. Filter on 0 or 1 element.
@since 0.5 *) @since 0.5 *)