diff --git a/subjects/highest/README.md b/subjects/highest/README.md index c507fd17..80fdd867 100644 --- a/subjects/highest/README.md +++ b/subjects/highest/README.md @@ -6,9 +6,10 @@ In this exercise a `Numbers` struct will be given. These methods have to be written: -- `List` that returns an `array` with every number in the struct -- `Latest` that returns an `Option` with the last added number -- `Highest` that return an `Option` with the highest number from the list, +- `new` create a new instance of Number. +- `List` that returns an `array` with every number in the struct. +- `Latest` that returns an `Option` with the last added number. +- `Highest` that return an `Option` with the highest number from the list. - `Highest_Three` that returns a `Vec` with the three highest numbers. ### Notions @@ -18,6 +19,8 @@ These methods have to be written: ### Expected functions ```rust +pub fn new(&[u32]) -> Self {} + pub fn List(&self) -> &[u32] {} pub fn Latest(&self) -> Option {} diff --git a/subjects/iterators/README.md b/subjects/iterators/README.md index 06894215..c8815824 100644 --- a/subjects/iterators/README.md +++ b/subjects/iterators/README.md @@ -2,10 +2,9 @@ ### Instructions -Create a method `new` that takes one number `usize` and initializes the `Number` struct. +Create a method `new` that takes one number `usize` and initializes the struct `Number`. -This method will have to determinate if the given number is even or odd. If it is even you will have to increment it by one to the next odd number and -if it is odd you have to increment by one to the next even number. +This method will have to determinate if the given number is even or odd. If it is even you will have to increment it by one to the next odd number and if it is odd you have to increment by one to the next even number. After that you will implement an iterator for the struct `Number` that returns a tuple (usize,usize,usize) containing each field of the struct Number.