feat: Added iterators5.rs exercise.
This commit is contained in:
15
info.toml
15
info.toml
@@ -741,6 +741,21 @@ 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_stack to make the code compile in order to test count.
|
||||
|
||||
The stack variable in count_stack 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_stack function."""
|
||||
|
||||
# THREADS
|
||||
|
||||
[[exercises]]
|
||||
|
||||
Reference in New Issue
Block a user