summary refs log tree commit diff
path: root/src/libstd/iterator.rs
AgeCommit message (Collapse)AuthorLines
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-2/+1
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-29fix code block syntax in two docstringsDaniel Micay-4/+4
2013-06-29'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep ↵Ben Blum-1/+1
for making them noncopyable.
2013-06-29iterator: UnfoldrIterator::new should have function argument lastblake2-ppc-2/+2
To match Rust conventions and enable use of `do` etc, make sure the closure is the last argument to the `new` method.
2013-06-27auto merge of #7430 : huonw/rust/vec-kill, r=thestingerbors-1/+0
2013-06-28std: silence some test warnings.Huon Wilson-1/+0
2013-06-27iterator: Add `IteratorUtil::max_by/min_by` methodgifnksm-0/+62
2013-06-26auto merge of #7345 : blake2-ppc/rust/iterator-flat-map, r=thestingerbors-0/+67
flat_map_ produces an iterator that maps each element to an iterator, and yields the elements of the produced iterators. This is the monadic bind :: M a -> (a -> M b) -> M b for iterators. Named just like the vec method, but with a trailing underline until the method resolution bug is resolved. We discussed the name chain_map, but I decided to go with flat_map_ for consistency with vec. Since it.map(f).flatten() would be the same as it.flat_map(f), we could choose to just implement a flatten method instead. Either way the possibilities are the same but flat_map is more convenient.
2013-06-25Remove stage0 cfgsJames Miller-5/+0
2013-06-24iterator: Add `IteratorUtil::flat_map_` methodblake2-ppc-0/+67
flat_map_ produces an iterator that maps each element to an iterator, and yields the elements of the produced iterators. This is the monadic bind :: M a -> (a -> M b) -> M b for iterators. Named just like the vec method, but with a trailing underline until the method resolution bug is resolved.
2013-06-24iterator: implement `collect` with FromIteratorDaniel Micay-5/+5
This makes it take advantage of the size hint for pre-allocation.
2013-06-22iterator: add a FromIterator traitDaniel Micay-1/+7
This is able to take advantage of the lower bound from the size hint.
2013-06-22iterator: add a size_hint default methodDaniel Micay-0/+49
also adds an implementation for the vector iterators
2013-06-21vec: replace `position` with `iter().position_`Daniel Micay-1/+1
2013-06-21vec: rm old_iter implementations, except BaseIterDaniel Micay-9/+30
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-24/+24
2013-06-16auto merge of #7177 : huonw/rust/unfold-fix, r=thestingerbors-2/+2
2013-06-16std: fix UnfoldrIterator cross-crate.Huon Wilson-2/+2
2013-06-15iterator: work around method resolve bugDaniel Micay-10/+10
2013-06-15iterator: add a `position` adaptorDaniel Micay-0/+24
2013-06-15iterator: add a `find` adaptorDaniel Micay-3/+23
2013-06-14add IteratorUtil to the preludeDaniel Micay-43/+3
2013-06-12auto merge of #7073 : influenza/rust/iterator-doc-fixes, r=catamorphismbors-3/+3
This commit fixes two typos and an incorrect description.
2013-06-11Iterator documentation fixesRon Dahlgren-3/+3
Fixes two typos and one incorrect description.
2013-06-11option: remove redundant old_iter implsDaniel Micay-20/+22
2013-06-09remove unused import warningsHuon Wilson-1/+0
2013-06-09std: remove {all*,any*,count} in favour of iteratorsHuon Wilson-10/+10
2013-06-07iterator: work around method resolve bug (#5898)Daniel Micay-4/+5
2013-06-08std: more dummy type parameters on iterators to work around #6967.Huon Wilson-18/+21
2013-06-06FixupsMarvin Löbel-6/+9
2013-06-06Removed IteratorUtil::to_vec and iter::to_vecMarvin Löbel-19/+0
2013-06-06Added IteratorUtil::collectMarvin Löbel-0/+27
2013-06-06std: work-around for take/skip type inference (#6967)Huon Wilson-11/+13
2013-05-30Remove unnecessary 'use' formsDaniel Farina-1/+0
Fix a laundry list of warnings involving unused imports that glutted up compilation output. There are more, but there seems to be some false positives (where 'remedy' appears to break the build), but this particular set of fixes seems safe.
2013-05-30Require documentation by default for libstdAlex Crichton-5/+361
Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand.
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-1/+7
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+719
This only changes the directory names; it does not change the "real" metadata names.