diff --git a/subjects/box_recursion/README.md b/subjects/box_recursion/README.md index 01209a0e..1fd5f9ee 100644 --- a/subjects/box_recursion/README.md +++ b/subjects/box_recursion/README.md @@ -2,21 +2,14 @@ ### Instructions -Using the given code create the following **functions**: +Using the given code, create the following **associated functions**: -- `new` which will initialize the `WorkEnvironment` as `None` -- `add_worker`, which receives two strings, one being the type of worker and the other the name of the worker. -- `remove_worker`, which removes the last worker that was placed in the `WorkEnvironment`, this function should - returns an `Option` with the name of the worker. -- `search_worker`, which returns a tuple with the name and type of worker. +- `new`: which will initialize the `WorkEnvironment` with `grade` set to `None`. +- `add_worker`: which receives two strings, one being the type of worker and the other the name of the worker. +- `remove_worker`: which removes the last worker that was placed in the `WorkEnvironment`, this function returns an `Option` with the name of the worker. +- `search_worker`: which returns a tuple with the name and type of worker. -You must also create a type called `Link`. This will be the connection of the structures `WorkEnvironment` and `Worker`. -Do not forget that this will be a recursion type and it must point to `None` if there is no workers. - -### Notions - -- [boc](https://doc.rust-lang.org/book/ch15-01-box.html) -- [Module std::option](https://doc.rust-lang.org/std/option/) +You must also create a type named `Link`. This will be the connection between the `WorkEnvironment` and `Worker` structures. This will be a recursion type, and it must point to `None` if there is no `Worker` to point to. ### Expected Functions and structures @@ -77,3 +70,8 @@ Some(("Alice", "Normal Worker")) WorkEnvironment { grade: None } $ ``` + +### Notions + +- [boc](https://doc.rust-lang.org/book/ch15-01-box.html) +- [Module std::option](https://doc.rust-lang.org/std/option/)