README.rst
1
2Itertools
3=========
4
5Extra iterator adaptors, functions and macros. Requires Rust 1.2+.
6
7Please read the `API documentation here`__
8
9__ https://bluss.github.io/rust-itertools/
10
11|build_status|_ |crates|_
12
13.. |build_status| image:: https://travis-ci.org/bluss/rust-itertools.svg?branch=master
14.. _build_status: https://travis-ci.org/bluss/rust-itertools
15
16.. |crates| image:: http://meritbadge.herokuapp.com/itertools
17.. _crates: https://crates.io/crates/itertools
18
19How to use with cargo::
20
21 [dependencies]
22 itertools = "0.4.19"
23
24How to use in your crate:
25
26.. code:: rust
27
28 #[macro_use] extern crate itertools;
29
30 use itertools::Itertools;
31
32How to contribute:
33
34- Fix a bug or implement a new thing
35- Include tests for your new feature, preferably a quickcheck test
36- Make a Pull Request
37
38
39Recent Changes
40--------------
41
42- 0.4.19
43
44 - Add ``.minmax_by()``
45 - Add ``itertools::free::cloned``
46 - Add ``itertools::free::rciter``
47 - Improve ``.step(n)`` slightly to take advantage of specialized Fuse better.
48
49- 0.4.18
50
51 - Only changes related to the "unstable" crate feature. This feature is more
52 or less deprecated.
53
54 - Use deprecated warnings when unstable is enabled. .enumerate_from() will
55 be removed imminently since it's using a deprecated libstd trait.
56
57- 0.4.17
58
59 - Fix bug in .kmerge() that caused it to often produce the wrong order (#134)
60
61- 0.4.16
62
63 - Improve precision of the interleave_shortest adaptor's size hint (it is
64 now computed exactly when possible).
65
66- 0.4.15
67
68 - Fixup on top of the workaround in 0.4.14. A function in itertools::free was
69 removed by mistake and now it is added back again.
70
71- 0.4.14
72
73 - Workaround an upstream regression in a rust nightly build that broke
74 compilation of of itertools::free::{interleave, merge}
75
76- 0.4.13
77
78 - Add .minmax() and .minmax_by_key(), iterator methods for finding both minimum
79 and maximum in one scan.
80 - Add .format_default(), a simpler version of .format() (lazy formatting
81 for iterators).
82
83- 0.4.12
84
85 - Add .zip_eq(), an adaptor like .zip() except it ensures iterators
86 of inequal length don't pass silently (instead it panics).
87 - Add .fold_while(), an iterator method that is a fold that
88 can short-circuit.
89 - Add .partition_map(), an iterator method that can separate elements
90 into two collections.
91
92- 0.4.11
93
94 - Add .get() for Stride{,Mut} and .get_mut() for StrideMut
95
96- 0.4.10
97
98 - Improve performance of .kmerge()
99
100- 0.4.9
101
102 - Add k-ary merge adaptor .kmerge()
103 - Fix a bug in .islice() with ranges a..b where a > b.
104
105- 0.4.8
106
107 - Implement Clone, Debug for Linspace
108
109- 0.4.7
110
111 - Add function diff_with() that compares two iterators
112 - Add .combinations_n(), an n-ary combinations iterator
113 - Add methods PutBack::with_value and PutBack::into_parts.
114
115- 0.4.6
116
117 - Add method .sorted()
118 - Add module ``itertools::free`` with free function variants of common
119 iterator adaptors and methods.
120 For example ``enumerate(iterable)``, ``rev(iterable)``, and so on.
121
122- 0.4.5
123
124 - Add .flatten()
125
126- 0.4.4
127
128 - Allow composing ZipSlices with itself
129
130- 0.4.3
131
132 - Write iproduct!() as a single expression; this allows temporary values
133 in its arguments.
134
135- 0.4.2
136
137 - Add .fold_options()
138 - Require Rust 1.1 or later
139
140- 0.4.1
141
142 - Update .dropping() to take advantage of .nth()
143
144- 0.4.0
145
146 - .merge(), .unique() and .dedup() now perform better due to not using
147 function pointers
148 - Add free functions enumerate() and rev()
149 - Breaking changes:
150
151 - Return types of .merge() and .merge_by() renamed and changed
152 - Method Merge::new removed
153 - .merge_by() now takes a closure that returns bool.
154 - Return type of .dedup() changed
155 - Return type of .mend_slices() changed
156 - Return type of .unique() changed
157 - Removed function times(), struct Times: use a range instead
158 - Removed deprecated macro icompr!()
159 - Removed deprecated FnMap and method .fn_map(): use .map_fn()
160 - .interleave_shortest() is no longer guaranteed to act like fused
161
162- 0.3.25
163
164 - Rename .sort_by() to .sorted_by(). Old name is deprecated.
165 - Fix well-formedness warnings from RFC 1214, no user visible impact
166
167- 0.3.24
168
169 - Improve performance of .merge()'s ordering function slightly
170
171- 0.3.23
172
173 - Added .chunks_lazy(), similar to (and based on) .group_by_lazy().
174 - Tweak linspace to match numpy.linspace and make it double ended.
175
176- 0.3.22
177
178 - Added ZipSlices, a fast zip for slices
179
180- 0.3.21
181
182 - Remove `Debug` impl for `Format`, it will have different use later
183
184- 0.3.20
185
186 - Optimize .group_by_lazy()
187
188- 0.3.19
189
190 - Added .group_by_lazy(), a possibly nonallocating group by
191 - Added .format(), a nonallocating formatting helper for iterators
192 - Remove uses of RandomAccessIterator since it has been deprecated in rust.
193
194- 0.3.17
195
196 - Added (adopted) Unfold from rust
197
198- 0.3.16
199
200 - Added adaptors .unique(), .unique_by()
201
202- 0.3.15
203
204 - Added method .sort_by()
205
206- 0.3.14
207
208 - Added adaptor .while_some()
209
210- 0.3.13
211
212 - Added adaptor .interleave_shortest()
213 - Added adaptor .pad_using()
214
215- 0.3.11
216
217 - Added assert_equal function
218
219- 0.3.10
220
221 - Bugfix .combinations() size_hint.
222
223- 0.3.8
224
225 - Added source RepeatCall
226
227- 0.3.7
228
229 - Added adaptor PutBackN
230 - Added adaptor .combinations()
231
232- 0.3.6
233
234 - Added itertools::partition, partition a sequence in place based on a predicate.
235 - Deprecate icompr!() with no replacement.
236
237- 0.3.5
238
239 - .map_fn() replaces deprecated .fn_map().
240
241- 0.3.4
242
243 - .take_while_ref() *by-ref adaptor*
244 - .coalesce() *adaptor*
245 - .mend_slices() *adaptor*
246
247- 0.3.3
248
249 - .dropping_back() *method*
250 - .fold1() *method*
251 - .is_empty_hint() *method*
252
253License
254-------
255
256Dual-licensed to be compatible with the Rust project.
257
258Licensed under the Apache License, Version 2.0
259http://www.apache.org/licenses/LICENSE-2.0 or the MIT license
260http://opensource.org/licenses/MIT, at your
261option. This file may not be copied, modified, or distributed
262except according to those terms.
263