Skip to content

Commit

Permalink
Merge pull request #632 from anikeef/fix-5th-chapter-exercise
Browse files Browse the repository at this point in the history
Add missing argument in 5th chapter exercise
  • Loading branch information
KtorZ committed Dec 6, 2023
2 parents bb5188c + ead82eb commit 8a23c7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ch05.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ Refactor `fastestCar` using `compose()` and other functions in pointfree-style.
{% initial src="./exercises/ch05/exercise_c.js#L4;" %}
```js
const fastestCar = (cars) => {
const sorted = sortBy(car => car.horsepower);
const sorted = sortBy(car => car.horsepower, cars);
const fastest = last(sorted);
return concat(fastest.name, ' is the fastest');
};
Expand Down

0 comments on commit 8a23c7d

Please sign in to comment.