-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use function names to identify branches.
Now when a named function is used as a step, the named function is added to the context of the cadence. It can be requested by name through step function parameters like any other context object. Instead of receiving the step function itself, however, the user receives a wrapper that will record the arguments passed to the step function. When the current step function has completed, the wrapper will move the cadence to the wrapped step function. The step function will be invoked with the recorded parameters. If the `cadence` function is passed the wrapper as the first argument, it will create a callback that will move the cadence to wrapped step function if it is invoked. The wrapped step function will be used to infer the context names of results given to the callbacks. We changed the behavior of `cadence` when it is invoked with a direct reference to a step function as it's first argument to match that of being invoked with a wrapped named step function as the first argument. Calling `cadence` with a direct reference to a step function will return a callback that will move the cadence to the referenced function if it is invoked. The wrapped step function will be used to infer the context names of results given to the callbacks. Closes #24.
- Loading branch information
1 parent
527e531
commit a219b06
Showing
3 changed files
with
109 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters