Browse Source

Update README.md

Add clarifications on function parameters and function description.
content-update
Tlekbai Ali 4 years ago committed by GitHub
parent
commit
55269ce15f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      subjects/curry-entries/README.md

19
subjects/curry-entries/README.md

@ -2,25 +2,22 @@
### Instructions ### Instructions
This exercise consists in creating curry functions to apply in the objects This exercise consists of creating curry functions to apply in the object's entries.
entries.
You will have to create the following curry functions: You will have to create the following curry functions:
- `defaultCurry` that will curry two objects in witch the second object must - `defaultCurry` curries two objects in which the second object overrides the values of the first. If the key is not present then add it with the corresponding value.
be the default object and returns a new object with the modifications applied - `mapCurry` replicates function `.map`, where first entry is function, second is object.
by the first object - `reduceCurry` replicates function `.reduce`, where first entry is function, second is (object, initial value).
- `mapCurry` that replicate the function `.map` - `filterCurry` replicates function `.filter`, where first entry is function, second is object.
- `reduceCurry` that replicate the function `.reduce`
- `filterCurry` that replicate the function `.filter`
You will also have to create for each curry function the following: You have to create for each curry function the following functions with one parameter `personnel`:
- `reduceScore` that will return the total value of the scores - `reduceScore` that will return the total value of the scores
of the persons who use the force of the persons who use the force.
- `filterForce` that will return the force users with `shootingScores` - `filterForce` that will return the force users with `shootingScores`
equal or higher than 80 equal or higher than 80
- `mapAverage` that will return a new object with the propriety `averageScore` - `mapAverage` that will return a new object with the propriety `averageScore`
that is the averages of the scores for each person that is the average of the scores for each person
### Notions ### Notions

Loading…
Cancel
Save