mirror of
https://github.com/c-cube/iter.git
synced 2025-12-05 19:00:31 -05:00
add Sequence.flat_map_l
This commit is contained in:
parent
5ad86a8b04
commit
2c82c3b135
2 changed files with 7 additions and 0 deletions
|
|
@ -92,6 +92,9 @@ let flatMap f seq k = seq (fun x -> f x k)
|
|||
|
||||
let flat_map = flatMap
|
||||
|
||||
let flat_map_l f seq k =
|
||||
seq (fun x -> List.iter k (f x))
|
||||
|
||||
let fmap f seq k =
|
||||
seq (fun x -> match f x with
|
||||
| None -> ()
|
||||
|
|
|
|||
|
|
@ -158,6 +158,10 @@ val flat_map : ('a -> 'b t) -> 'a t -> 'b t
|
|||
element of the initial sequence, and calls {!concat}.
|
||||
@since 0.5 *)
|
||||
|
||||
val flat_map_l : ('a -> 'b list) -> 'a t -> 'b t
|
||||
(** Convenience function combining {!flat_map} and {!of_list}
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
val fmap : ('a -> 'b option) -> 'a t -> 'b t
|
||||
(** @deprecated use {!filter_map} since 0.6 *)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue