Sequence.ExpertThe functions in Expert expose internal structure which is normally meant to be hidden. For example, at least when f is purely functional, it is not intended for client code to distinguish between
List.filter xs ~f
|> Sequence.of_listand
Sequence.of_list xs
|> Sequence.filter ~fBut sometimes for operational reasons it still makes sense to distinguish them. For example, being able to handle Skips explicitly allows breaking up some computationally expensive sequences into smaller chunks of work.
next_step returns the next step in a sequence's construction. It is like next, but it also allows observing Skip steps.
val delayed_fold_step : 'a t -> init:'s -> f:('s -> 'a option -> k:('s -> 'r) -> 'r) ->
finish:('s -> 'r) -> 'rdelayed_fold_step is liked delayed_fold, but f takes an option where None represents a Skip step.