Browse Source

docs(copy): correct grammar

pull/1092/head
davhojt 3 years ago committed by Dav Hojt
parent
commit
84d07f4ad6
  1. 30
      subjects/copy/README.md

30
subjects/copy/README.md

@ -2,27 +2,18 @@
### Instructions ### Instructions
Your objective is to fix the **functions** work so that the program works. Create the following **functions**. The objective is to know how ownership works with different types.
- `nbr_function` returns a tuple: - `nbr_function` returns a tuple:
- with the `original` value - with the `original` value.
- the `exponential function` of the value - the `exponential function` of the value.
- and the `natural logarithm` of this `absolute` value - and the `natural logarithm` of the `absolute` value.
- `str_function` returns a tuple: - `str_function` returns a tuple:
- with the `original` value - with the `original` value.
- and the `exponential function` each value as a string (see the example) - and the `exponential function` of each value as a string (see the example).
- `vec_function` returns a tuple: - `vec_function` returns a tuple:
- with the `original` value - with the `original` value.
- and the `natural logarithm` of each `absolute` value - and the `natural logarithm` of each `absolute` value.
The objective is to know how ownership works with different types.
### Notions
- [scope](https://doc.rust-lang.org/rust-by-example/scope/move.html)
- [Primitive Type f64](https://doc.rust-lang.org/std/primitive.f64.html)
### Expected Functions
```rust ```rust
pub fn nbr_function(c: i32) -> (i32, f64, f64) { pub fn nbr_function(c: i32) -> (i32, f64, f64) {
@ -66,3 +57,8 @@ $ cargo run
([1, 2, 4, 5], [0.0, 0.6931471805599453, 1.3862943611198906, 1.6094379124341003]) ([1, 2, 4, 5], [0.0, 0.6931471805599453, 1.3862943611198906, 1.6094379124341003])
$ $
``` ```
### Notions
- [scope](https://doc.rust-lang.org/rust-by-example/scope/move.html)
- [Primitive Type f64](https://doc.rust-lang.org/std/primitive.f64.html)

Loading…
Cancel
Save