diff options
| author | apogeeoak <59737221+apogeeoak@users.noreply.github.com> | 2021-02-10 18:03:29 -0500 |
|---|---|---|
| committer | apogeeoak <59737221+apogeeoak@users.noreply.github.com> | 2021-02-10 18:03:29 -0500 |
| commit | b29ea17ea94d1862114af2cf5ced0e09c197dc35 (patch) | |
| tree | 293f42135caa48581d8b3d762f5c43fdd319a469 /info.toml | |
| parent | ab57c26cf9199eca7937a75712079d908e5d330d (diff) | |
feat: Added iterators5.rs exercise.
Diffstat (limited to 'info.toml')
| -rw-r--r-- | info.toml | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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]] |
