Update article.md

"if arguments count" -> "if the arguments count"
"allows to easily" -> "allows us to easily"
"seen in the logging example:" -> "seen in the logging example,"
rephrasing rest of above sentence for readability
This commit is contained in:
Peter Roche 2020-02-13 22:19:17 -07:00 committed by GitHub
parent 7fb11bd13a
commit c6c25c97da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -191,6 +191,6 @@ But most implementations of currying in JavaScript are advanced, as described: t
## Summary
*Currying* is a transform that makes `f(a,b,c)` callable as `f(a)(b)(c)`. JavaScript implementations usually both keep the function callable normally and return the partial if arguments count is not enough.
*Currying* is a transform that makes `f(a,b,c)` callable as `f(a)(b)(c)`. JavaScript implementations usually both keep the function callable normally and return the partial if the arguments count is not enough.
Currying allows to easily get partials. As we've seen in the logging example: the universal function `log(date, importance, message)` after currying gives us partials when called with one argument like `log(date)` or two arguments `log(date, importance)`.
Currying allows us to easily get partials. As we've seen in the logging example, after currying the three argument universal function `log(date, importance, message)` gives us partials when called with one argument (like `log(date)`) or two arguments (like `log(date, importance)`).