mirror of https://github.com/01-edu/public.git
docs(adding_twice): correct grammar
This commit is contained in:
parent
57ef30f7ba
commit
b0c3496062
|
@ -2,15 +2,12 @@
|
|||
|
||||
### Instructions
|
||||
|
||||
In this exercise you will have to reuse your `add_curry` function (copy and paste it directly in your lib.rs file).
|
||||
Then you have to create the function `twice` using closures, this function will
|
||||
take a function f(x) as parameter and return a function f(f(x)).
|
||||
You'll need to reuse your `add_curry` function. Copy and paste it directly into your `lib.rs` file.
|
||||
|
||||
Now create a function named `twice` using closures. This function will take a function `f(x)` as parameter, and return a function `f(f(x))`.
|
||||
|
||||
So, the purpose of this function is to add two times the value in `add_curry` to the original value.
|
||||
|
||||
### Notions
|
||||
|
||||
- [higher order function](https://doc.rust-lang.org/rust-by-example/fn/hof.html#higher-order-functions)
|
||||
|
||||
### Expected functions
|
||||
|
||||
The type of the arguments are missing. Use the example `main` function to determine the correct type.
|
||||
|
@ -57,3 +54,7 @@ The value is 67
|
|||
The value is -57
|
||||
$
|
||||
```
|
||||
|
||||
### Notions
|
||||
|
||||
- [higher order function](https://doc.rust-lang.org/rust-by-example/fn/hof.html#higher-order-functions)
|
||||
|
|
Loading…
Reference in New Issue