diff options
| author | Mukund Bhudia <mukund_bhudia@hotmail.com> | 2020-08-04 12:57:01 +0100 |
|---|---|---|
| committer | Mukund Bhudia <mukund_bhudia@hotmail.com> | 2020-08-04 12:57:01 +0100 |
| commit | 9642f5a3f686270a4f8f6ba969919ddbbc4f7fdd (patch) | |
| tree | 7b22cf12f578e012316febb39a03d18dab9eeeca /info.toml | |
| parent | c4853ee6bb2b3791ba04daf14105bfab2b53e79f (diff) | |
feat: Added iterators1.rs exercise
Diffstat (limited to 'info.toml')
| -rw-r--r-- | info.toml | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -645,6 +645,27 @@ inside the loop but still in the main thread. thread-local copy of the numbers.""" [[exercises]] +name = "iterators1" +path = "exercises/standard_library_types/iterators1.rs" +mode = "compile" +hint = """ +Step 1: +We need to apply something to the collection `my_fav_fruits` before we start to go through +it. What could that be? Take a look at the struct definition for a vector for inspiration: +https://doc.rust-lang.org/std/vec/struct.Vec.html. + + +Step 2 & step 2.1: +Very similar to the lines above an below. You've got this! + + +Step 3: +An iterator goes through all elements in a collection, but what if we've run out of +elements? What should we expect here? If you're stuck, take a look at +https://doc.rust-lang.org/std/iter/trait.Iterator.html for some ideas. +""" + +[[exercises]] name = "iterators2" path = "exercises/standard_library_types/iterators2.rs" mode = "test" |
