Merge pull request #646 from apogeeoak/iterator
Added iterators5.rs exercise.
This commit is contained in:
16
info.toml
16
info.toml
@@ -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]]
|
||||
|
||||
Reference in New Issue
Block a user