mirror of
https://github.com/c-cube/iter.git
synced 2025-12-05 19:00:31 -05:00
prepare for 0.7
This commit is contained in:
parent
c08dd14270
commit
3abaae6066
5 changed files with 20 additions and 10 deletions
|
|
@ -1,5 +1,13 @@
|
|||
# Changelog
|
||||
|
||||
## 0.7
|
||||
|
||||
- add missing entry in changelog and missing since annotations
|
||||
- Add `shuffle`.
|
||||
- Add `shuffle_buffer`.
|
||||
- Add `sample`.
|
||||
- Add `map_by_2`.
|
||||
|
||||
## 0.6
|
||||
|
||||
- deprecate `flatMap` and `fmap`
|
||||
|
|
|
|||
2
_oasis
2
_oasis
|
|
@ -1,6 +1,6 @@
|
|||
OASISFormat: 0.4
|
||||
Name: sequence
|
||||
Version: 0.6
|
||||
Version: 0.7
|
||||
Homepage: https://github.com/c-cube/sequence
|
||||
Authors: Simon Cruanes
|
||||
License: BSD-2-clause
|
||||
|
|
|
|||
2
opam
2
opam
|
|
@ -1,4 +1,6 @@
|
|||
opam-version: "1.2"
|
||||
name: "sequence"
|
||||
version: "0.7"
|
||||
author: "Simon Cruanes"
|
||||
maintainer: "simon.cruanes@inria.fr"
|
||||
build: [
|
||||
|
|
|
|||
10
sequence.mli
10
sequence.mli
|
|
@ -112,7 +112,7 @@ val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
|
|||
val map_by_2 : ('a -> 'a -> 'a) -> 'a t -> 'a t
|
||||
(** Map objects two by two. lazily.
|
||||
The last element is kept in the sequence if the count is odd.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 0.7 *)
|
||||
|
||||
val for_all : ('a -> bool) -> 'a t -> bool
|
||||
(** Do all elements satisfy the predicate? *)
|
||||
|
|
@ -419,7 +419,7 @@ val int_range_dec : start:int -> stop:int -> int t
|
|||
|
||||
val bools : bool t
|
||||
(** Iterates on [true] and [false]
|
||||
@since NEXT_RELEASE *)
|
||||
@since 0.7 *)
|
||||
|
||||
val of_set : (module Set.S with type elt = 'a and type t = 'b) -> 'b -> 'a t
|
||||
(** Convert the given set to a sequence. The set module must be provided. *)
|
||||
|
|
@ -501,7 +501,7 @@ val random_list : 'a list -> 'a t
|
|||
val shuffle : 'a t -> 'a t
|
||||
(** [shuffle seq] returns a perfect shuffle of [seq].
|
||||
Uses O(length seq) memory and time. Eager.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 0.7 *)
|
||||
|
||||
val shuffle_buffer : int -> 'a t -> 'a t
|
||||
(** [shuffle_buffer n seq] returns a sequence of element of [seq] in random
|
||||
|
|
@ -509,7 +509,7 @@ val shuffle_buffer : int -> 'a t -> 'a t
|
|||
|
||||
The first [n] elements of the sequence are consumed immediately. The
|
||||
rest is consumed lazily.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 0.7 *)
|
||||
|
||||
(** {2 Sampling} *)
|
||||
|
||||
|
|
@ -518,7 +518,7 @@ val sample : int -> 'a t -> 'a array
|
|||
It will consume the sequence and use O(n) memory.
|
||||
|
||||
It returns an array of size [min (length seq) n].
|
||||
@since NEXT_RELEASE *)
|
||||
@since 0.7 *)
|
||||
|
||||
(** {2 Infix functions} *)
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ val mapi : f:(int -> 'a -> 'b) -> 'a t -> 'b t
|
|||
val map_by_2 : f:('a -> 'a -> 'a) -> 'a t -> 'a t
|
||||
(** Map objects two by two. lazily.
|
||||
The last element is kept in the sequence if the count is odd.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 0.7 *)
|
||||
|
||||
val for_all : f:('a -> bool) -> 'a t -> bool
|
||||
(** Do all elements satisfy the predicate? *)
|
||||
|
|
@ -449,7 +449,7 @@ val random_list : 'a list -> 'a t
|
|||
val shuffle : 'a t -> 'a t
|
||||
(** [shuffle seq] returns a perfect shuffle of [seq].
|
||||
Uses O(length seq) memory and time. Eager.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 0.7 *)
|
||||
|
||||
val shuffle_buffer : n:int -> 'a t -> 'a t
|
||||
(** [shuffle_buffer n seq] returns a sequence of element of [seq] in random
|
||||
|
|
@ -457,7 +457,7 @@ val shuffle_buffer : n:int -> 'a t -> 'a t
|
|||
|
||||
The first [n] elements of the sequence are consumed immediately. The
|
||||
rest is consumed lazily.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 0.7 *)
|
||||
|
||||
(** {2 Sampling} *)
|
||||
|
||||
|
|
@ -466,7 +466,7 @@ val sample : n:int -> 'a t -> 'a array
|
|||
It will consume the sequence and use O(n) memory.
|
||||
|
||||
It returns an array of size [min (length seq) n].
|
||||
@since NEXT_RELEASE *)
|
||||
@since 0.7 *)
|
||||
|
||||
(** {2 Infix functions} *)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue