Skip to content

Commit

Permalink
Document changes to fromNode that allow the return fn to be partially…
Browse files Browse the repository at this point in the history
… applied in some cases
  • Loading branch information
JamieDixon committed May 27, 2020
1 parent de54156 commit 69bc2ea
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/src/pages/docs/crocks/Async.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,14 @@ As such, the need for binding may arise. `fromNode` provides a second, optional
argument that takes the context that will be used to bind the function being
wrapped.

Any curried interface will not be respected and if a curried interface is needed
then [`nAry`][nary] can be used.
The function returned from `fromNode` will be automatically curried, allowing you
to partially apply the function so long as the arity of the original function given
to `fromNode` can be determined via its `.length` property.

In practice this means that functions defined via `compose` or those making use
of `argument`, spread args (`...args`) or default values for parameters, will not be
good candidates for partial application.


<!-- eslint-disable no-console -->
<!-- eslint-disable no-sequences -->
Expand Down

0 comments on commit 69bc2ea

Please sign in to comment.