diff --git a/src/Sequence.ml b/src/Sequence.ml index 9397ae1..5819f21 100644 --- a/src/Sequence.ml +++ b/src/Sequence.ml @@ -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 diff --git a/src/Sequence.mli b/src/Sequence.mli index d08af7b..f9635cf 100644 --- a/src/Sequence.mli +++ b/src/Sequence.mli @@ -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. *)