@@ -46,7 +46,7 @@ type +'a iter = 'a t
4646type 'a equal = 'a -> 'a -> bool
4747type 'a hash = 'a -> int
4848
49- (* * {2 Creation} *)
49+ (* * {1 Creation} *)
5050
5151val from_iter : (('a -> unit ) -> unit ) -> 'a t
5252(* * Build an iterator from a iter function *)
@@ -111,7 +111,7 @@ val unfoldr : ('b -> ('a * 'b) option) -> 'b -> 'a t
111111val scan : ('b -> 'a -> 'b ) -> 'b -> 'a t -> 'b t
112112(* * Iterator of intermediate results *)
113113
114- (* * {2 Consumption} *)
114+ (* * {1 Consumption} *)
115115
116116val iter : ('a -> unit ) -> 'a t -> unit
117117(* * Consume the iterator, passing all its arguments to the function.
@@ -191,7 +191,7 @@ val length : 'a t -> int
191191val is_empty : 'a t -> bool
192192(* * Is the iterator empty? Forces the iterator. *)
193193
194- (* * {2 Transformation} *)
194+ (* * {1 Transformation} *)
195195
196196val filter : ('a -> bool ) -> 'a t -> 'a t
197197(* * Filter on elements of the iterator *)
@@ -260,7 +260,7 @@ val keep_error : (_, 'e) Result.result t -> 'e t
260260(* * [keep_error l] retains only elements of the form [Error x].
261261 @since 1.0 *)
262262
263- (* * {2 Caching} *)
263+ (* * {1 Caching} *)
264264
265265val persistent : 'a t -> 'a t
266266(* * Iterate on the iterator, storing elements in an efficient internal structure..
@@ -279,7 +279,7 @@ val persistent_lazy : 'a t -> 'a t
279279 is interrupted prematurely ({!take}, etc.) then [s'] will not be
280280 memorized, and the next call to [s'] will traverse [s] again. *)
281281
282- (* * {2 Misc} *)
282+ (* * {1 Misc} *)
283283
284284val sort : ?cmp : ('a -> 'a -> int ) -> 'a t -> 'a t
285285(* * Sort the iterator. Eager, O(n) ram and O(n ln(n)) time.
@@ -383,7 +383,7 @@ val group_join_by : ?eq:'a equal -> ?hash:'a hash ->
383383 precondition: for any [x] and [y], if [eq x y] then [hash x=hash y] must hold.
384384 @since 0.10 *)
385385
386- (* * {3 Set-like} *)
386+ (* * {2 Set-like} *)
387387
388388val inter :
389389 ?eq : 'a equal -> ?hash : 'a hash ->
@@ -432,7 +432,7 @@ val subset :
432432 not (subset (1 -- 4) (2 -- 10))
433433*)
434434
435- (* * {3 Arithmetic} *)
435+ (* * {2 Arithmetic} *)
436436
437437val max : ?lt : ('a -> 'a -> bool ) -> 'a t -> 'a option
438438(* * Max element of the iterator, using the given comparison function.
@@ -461,7 +461,7 @@ val sumf : float t -> float
461461(* * Sum of elements, using Kahan summation
462462 @since 0.11 *)
463463
464- (* * {3 List-like} *)
464+ (* * {2 List-like} *)
465465
466466val head : 'a t -> 'a option
467467(* * First element, if any, otherwise [None]
@@ -501,7 +501,7 @@ val zip_i : 'a t -> (int * 'a) t
501501(* * Zip elements of the iterator with their index in the iterator.
502502 @since 1.0 Changed type to just give an iterator of pairs *)
503503
504- (* * {3 Pair iterators} *)
504+ (* * {2 Pair iterators} *)
505505
506506val fold2 : ('c -> 'a -> 'b -> 'c ) -> 'c -> ('a * 'b ) t -> 'c
507507
@@ -512,7 +512,7 @@ val map2 : ('a -> 'b -> 'c) -> ('a * 'b) t -> 'c t
512512val map2_2 : ('a -> 'b -> 'c ) -> ('a -> 'b -> 'd ) -> ('a * 'b ) t -> ('c * 'd ) t
513513(* * [map2_2 f g seq2] maps each [x, y] of seq2 into [f x y, g x y] *)
514514
515- (* * {2 Data structures converters} *)
515+ (* * {1 Data structures converters} *)
516516
517517val to_list : 'a t -> 'a list
518518(* * Convert the iterator into a list. Preserves order of elements.
@@ -649,7 +649,7 @@ val of_klist : 'a klist -> 'a t
649649val to_klist : 'a t -> 'a klist
650650(* * Make the iterator persistent and then iterate on it. Eager. *)
651651
652- (* * {3 Sets} *)
652+ (* * {2 Sets} *)
653653
654654module Set : sig
655655 module type S = sig
@@ -673,7 +673,7 @@ module Set : sig
673673 module Make (X : Set.OrderedType ) : S with type elt = X. t
674674end
675675
676- (* * {3 Maps} *)
676+ (* * {2 Maps} *)
677677
678678module Map : sig
679679 module type S = sig
@@ -699,7 +699,7 @@ module Map : sig
699699 module Make (V : Map.OrderedType ) : S with type key = V. t
700700end
701701
702- (* * {2 Random iterators} *)
702+ (* * {1 Random iterators} *)
703703
704704val random_int : int -> int t
705705(* * Infinite iterator of random integers between 0 and
@@ -730,7 +730,7 @@ val shuffle_buffer : int -> 'a t -> 'a t
730730 rest is consumed lazily.
731731 @since 0.7 *)
732732
733- (* * {3 Sampling} *)
733+ (* * {2 Sampling} *)
734734
735735val sample : int -> 'a t -> 'a array
736736 (* * [sample n seq] returns k samples of [seq], with uniform probability.
@@ -739,7 +739,7 @@ val sample : int -> 'a t -> 'a array
739739 It returns an array of size [min (length seq) n].
740740 @since 0.7 *)
741741
742- (* * {2 Infix functions} *)
742+ (* * {1 Infix functions} *)
743743
744744module Infix : sig
745745 val (-- ) : int -> int -> int t
770770
771771include module type of Infix
772772
773- (* * {2 Pretty printing} *)
773+ (* * {1 Pretty printing} *)
774774
775775val pp_seq : ?sep : string -> (Format .formatter -> 'a -> unit ) ->
776776 Format .formatter -> 'a t -> unit
@@ -784,7 +784,7 @@ val pp_buf : ?sep:string -> (Buffer.t -> 'a -> unit) ->
784784val to_string : ?sep : string -> ('a -> string ) -> 'a t -> string
785785(* * Print into a string *)
786786
787- (* * {2 Basic IO}
787+ (* * {1 Basic IO}
788788
789789 Very basic interface to manipulate files as iterator of chunks/lines. The
790790 iterators take care of opening and closing files properly; every time
0 commit comments