diff options
| author | marisa <mokou@fastmail.com> | 2021-04-21 10:10:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-21 10:10:50 +0200 |
| commit | 79cc65791715652a7f35a5b7f51309b40033cdb9 (patch) | |
| tree | 4dd311fc5a9594d731fed0157a0517246e43f35f /info.toml | |
| parent | 2b766ef9f9ee36a5fac198b5e95a4be03a62bfe2 (diff) | |
| parent | 9c88ea91266c84901fd46496902610241dab3baf (diff) | |
Merge pull request #646 from apogeeoak/iterator
Added iterators5.rs exercise.
Diffstat (limited to 'info.toml')
| -rw-r--r-- | info.toml | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -744,6 +744,22 @@ a mutable variable. Or, you might write code utilizing recursion and a match clause. In Rust you can take another functional approach, computing the factorial elegantly with ranges and iterators.""" +[[exercises]] +name = "iterators5" +path = "exercises/standard_library_types/iterators5.rs" +mode = "test" +hint = """ +The documentation for the std::iter::Iterator trait contains numerous methods +that would be helpful here. + +Return 0 from count_collection_iterator to make the code compile in order to +test count_iterator. + +The collection variable in count_collection_iterator is a slice of HashMaps. It +needs to be converted into an iterator in order to use the iterator methods. + +The fold method can be useful in the count_collection_iterator function.""" + # THREADS [[exercises]] |
