mirror of
https://github.com/c-cube/iter.git
synced 2025-12-06 11:15:32 -05:00
prepare for 1.4
This commit is contained in:
parent
8be2428829
commit
65ab9376b0
4 changed files with 10 additions and 5 deletions
|
|
@ -1,4 +1,9 @@
|
||||||
|
|
||||||
|
# 1.4
|
||||||
|
|
||||||
|
- fix dune files for dune 3
|
||||||
|
- add `for_each` and `for_eachi`
|
||||||
|
|
||||||
# 1.3
|
# 1.3
|
||||||
|
|
||||||
- use `inline` annotations
|
- use `inline` annotations
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
name: "iter"
|
name: "iter"
|
||||||
version: "1.3"
|
version: "1.4"
|
||||||
authors: ["Simon Cruanes" "Gabriel Radanne"]
|
authors: ["Simon Cruanes" "Gabriel Radanne"]
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
license: "BSD-2-clause"
|
license: "BSD-2-clause"
|
||||||
|
|
|
||||||
|
|
@ -124,13 +124,13 @@ val for_each : 'a t -> ('a -> unit) -> unit
|
||||||
(** Consume the iterator, passing all its arguments to the function.
|
(** Consume the iterator, passing all its arguments to the function.
|
||||||
[for_each seq f] is the same as [iter f seq], i.e., [iter] with
|
[for_each seq f] is the same as [iter f seq], i.e., [iter] with
|
||||||
arguments reversed.
|
arguments reversed.
|
||||||
@since NEXT_RELEASE *)
|
@since 1.4 *)
|
||||||
|
|
||||||
val for_eachi : 'a t -> (int -> 'a -> unit) -> unit
|
val for_eachi : 'a t -> (int -> 'a -> unit) -> unit
|
||||||
(** Iterate on elements and their index in the iterator.
|
(** Iterate on elements and their index in the iterator.
|
||||||
[for_eachi seq f] is the same as [iteri f seq], i.e., [iteri] with
|
[for_eachi seq f] is the same as [iteri f seq], i.e., [iteri] with
|
||||||
arguments reversed.
|
arguments reversed.
|
||||||
@since NEXT_RELEASE *)
|
@since 1.4 *)
|
||||||
|
|
||||||
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
|
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
|
||||||
(** Fold over elements of the iterator, consuming it *)
|
(** Fold over elements of the iterator, consuming it *)
|
||||||
|
|
|
||||||
|
|
@ -92,13 +92,13 @@ val for_each : seq:'a t -> ('a -> unit) -> unit
|
||||||
(** Consume the iterator, passing all its arguments to the function.
|
(** Consume the iterator, passing all its arguments to the function.
|
||||||
[for_each seq f] is the same as [iter f seq], i.e., [iter] with
|
[for_each seq f] is the same as [iter f seq], i.e., [iter] with
|
||||||
arguments reversed.
|
arguments reversed.
|
||||||
@since NEXT_RELEASE *)
|
@since 1.4 *)
|
||||||
|
|
||||||
val for_eachi : seq:'a t -> (int -> 'a -> unit) -> unit
|
val for_eachi : seq:'a t -> (int -> 'a -> unit) -> unit
|
||||||
(** Iterate on elements and their index in the iterator.
|
(** Iterate on elements and their index in the iterator.
|
||||||
[for_eachi seq f] is the same as [iteri f seq], i.e., [iteri] with
|
[for_eachi seq f] is the same as [iteri f seq], i.e., [iteri] with
|
||||||
arguments reversed.
|
arguments reversed.
|
||||||
@since NEXT_RELEASE *)
|
@since 1.4 *)
|
||||||
|
|
||||||
val fold : f:('a -> 'b -> 'a) -> init:'a -> 'b t -> 'a
|
val fold : f:('a -> 'b -> 'a) -> init:'a -> 'b t -> 'a
|
||||||
(** Fold over elements of the iterator, consuming it *)
|
(** Fold over elements of the iterator, consuming it *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue