about summary refs log tree commit diff
path: root/doc/tutorial-container.md
AgeCommit message (Collapse)AuthorLines
2014-01-05Convert sub tutorials into Guides #10838Alan Andrade-410/+0
Ensure configure creates doc/guides directory Fix configure makefile and tests Remove old guides dir and configure option, convert testing to guide Remove ignored files Fix submodule issue prepend dir in makefile so that bor knows how to build the docs S to uppercase
2013-11-17Forbid privacy in inner functionsAlex Crichton-0/+2
Closes #10111
2013-11-04docs: Replace std::iterator with std::iter.Huon Wilson-1/+1
2013-09-18doc: Update container tutorial with new names of methods and macrosblake2-ppc-22/+27
`deque` -> `ringbuf`, mention `extra::dlist`. fix reference to vector method `bsearch`. Also convert all output in example code to use `print!`/`println!`
2013-09-18clarify vector stub in the container tutorialDaniel Micay-4/+4
This also renames the section, as managed vectors cannot be resized (since it would invalidate the other references).
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-1/+1
The trait will keep the `Iterator` naming, but a more concise module name makes using the free functions less verbose. The module will define iterables in addition to iterators, as it deals with iteration in general.
2013-08-29Make the iterator protocol more explicitKevin Ballard-2/+35
Document the fact that the iterator protocol only defines behavior up until the first None is returned. After this point, iterators are free to behave how they wish. Add a new iterator adaptor Fuse<T> that modifies iterators to return None forever if they returned None once.
2013-08-22doc: add range iterators in the for loop sectionAdrien Tétar-0/+12
2013-08-20enable tests for the container tutorialDaniel Micay-3/+3
2013-08-20iterator: add a method for reversing a containerDaniel Micay-0/+10
this works on any container with a mutable double-ended iterator
2013-08-15update the iterator tutorialDaniel Micay-15/+11
2013-08-15std: Move the iterator param on FromIterator and Extendable to the method.Huon Wilson-2/+2
If they are on the trait then it is extremely annoying to use them as generic parameters to a function, e.g. with the iterator param on the trait itself, if one was to pass an Extendable<int> to a function that filled it either from a Range or a Map<VecIterator>, one needs to write something like: fn foo<E: Extendable<int, Range<int>> + Extendable<int, Map<&'self int, int, VecIterator<int>>> (e: &mut E, ...) { ... } since using a generic, i.e. `foo<E: Extendable<int, I>, I: Iterator<int>>` means that `foo` takes 2 type parameters, and the caller has to specify them (which doesn't work anyway, as they'll mismatch with the iterators used in `foo` itself). This patch changes it to: fn foo<E: Extendable<int>>(e: &mut E, ...) { ... }
2013-08-03make `for` parse as `foreach` doesDaniel Micay-8/+7
Closes #6997
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-9/+8
2013-07-24improve container/iterator tutorialDaniel Micay-5/+7
2013-07-24document random-access iteratorsDaniel Micay-0/+28
2013-07-24expand on double-ended iterators in the tutorialDaniel Micay-6/+22
2013-07-12extend the iterator tutorialDaniel Micay-0/+101
documents conversion, size hints and double-ended iterators and adds more of the traits to the prelude
2013-07-04Implement consuming iterators for ~[], remove vec::{consume, ↵Huon Wilson-1/+1
consume_reverse, map_consume}.
2013-06-28add a tutorial on containers and iteratorsDaniel Micay-0/+207