summary refs log tree commit diff
path: root/src/libcore/iter.rs
AgeCommit message (Collapse)AuthorLines
2012-07-05A new `times` method on numeric typesBen Striegel-0/+4
This method is intended to elegantly subsume two common iteration functions. The first is `iter::range`, which is used identically to the method introduced in this commit, but currently works only on uints. The second is a common case of `{int, i8, uint, etc.}::range`, in the case where the inductive variable is ignored. Compare the usage of the three: ``` for iter::range(100u) { // do whatever } for int::range(0, 100) |_i| { // do whatever } for 100.times { // do whatever } ``` I feel that the latter reads much more nicely than the first two approaches, and unlike the first two the new method allows the user to ignore the specific type of the number (ineed, if we're throwing away the inductive variable, who cares what type it is?). A minor benefit is that this new method will be somewhat familiar to users of Ruby, from which we borrow the name "times".
2012-07-03core: Convert iter::repeat to the for protocolBrian Anderson-2/+2
2012-07-01Convert to new closure syntaxBrian Anderson-16/+16
2012-06-30Eliminate usages of old sugared call syntaxBrian Anderson-5/+5
2012-06-29Switch the compiler over to using ~[] notation instead of []/~. Closes #2759.Michael Sullivan-32/+32
2012-06-28Add position() to iter/iter-traitBen Blum-0/+14
2012-06-27Removed pretty much all the vector+ from core (issue #2719)Eric Holk-1/+1
2012-06-25Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725.Michael Sullivan-32/+32
2012-06-21Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.Graydon Hoare-4/+4
2012-06-07Use #[cfg(unix)] and #[cfg(windows)] everywhereBrian Anderson-2/+2
2012-04-27new, simpler approach to the iter libraryNiko Matsakis-83/+51
2012-04-13change to use && mode (can't move from upvar)Niko Matsakis-5/+5
relevant to #1965
2012-04-06Re-rename option functionsTim Chevalier-1/+1
get_with_default (nee from_maybe) => get_default with_option (nee maybe) => map_default with_option_do (nee may) => iter As per discussion of 21be1379d561b6679a8a2ea47dce88f948c5acca
2012-04-02Rename some core::option functionsTim Chevalier-1/+1
from_maybe => get_with_default maybe => with_option may => with_option_do I know these names are kind of ridiculous, but it's the best I could think of. Feel free to bikeshed. Closes #2081
2012-03-27core: Rename iter::to_list to to_vec. Closes #2056Brian Anderson-11/+11
2012-03-23Implement new inference algorithm.Niko Matsakis-2/+2
2012-03-22make --enforce-mut-vars always on, add mut annotations to remaining filesNiko Matsakis-3/+2
2012-03-15Comments only: associate core::iter FIXMEs with issue numbersTim Chevalier-0/+3
2012-03-07add mutability annotations to libcoreNiko Matsakis-4/+4
2012-02-12core: Add iter::filter_mapBrian Anderson-0/+25
2012-02-12core: Add iterable implementation for stringsBrian Anderson-0/+6
2012-02-12core: Rename iter::reverse to iter::reversed for consistency with vec modBrian Anderson-4/+4
2012-02-12core: Implement foldl/r without copying the accumulatorBrian Anderson-12/+18
2012-02-12core: Add iter::foldrBrian Anderson-0/+19
2012-02-12core: Add iter::countBrian Anderson-0/+15
2012-02-12core: Add iter::reverseBrian Anderson-0/+10
2012-02-12core: Add iter::min/maxBrian Anderson-0/+45
2012-01-31add iter library in preliminary form (limited syntactic support)Niko Matsakis-0/+171