add Sequence.append_l

This commit is contained in:
Simon Cruanes 2017-10-11 17:20:55 +02:00
parent e3f4e068c1
commit cdf43fd354
2 changed files with 7 additions and 0 deletions

View file

@ -150,6 +150,8 @@ let filter p seq k = seq (fun x -> if p x then k x)
let append s1 s2 k = s1 k; s2 k
let append_l l k = List.iter (fun sub -> sub k) l
let concat s k = s (fun s' -> s' k)
(*$R

View file

@ -184,6 +184,11 @@ val append : 'a t -> 'a t -> 'a t
(** Append two sequences. Iterating on the result is like iterating
on the first, then on the second. *)
val append_l : 'a t list -> 'a t
(** Append sequences. Iterating on the result is like iterating
on the each sequence of the list in order.
@since NEXT_RELEASE *)
val concat : 'a t t -> 'a t
(** Concatenate a sequence of sequences into one sequence. *)