Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Ignore
- const p = Nancy.reject(42)
- .then(() => console.log('why')) // ignored
- .then(() => console.log('you')) // ignored
- .then(() => console.log('ignoring me?!')) // ignored!
- // p is a Nancy
- // p.state is states.rejected
- // p.value is 42
- const carry = output => input => {
- console.log(input);
- return output;
- };
- // Chain
- Nancy.resolve(0)
- .then(carry(1)) // logs 0
- .then(carry(2)) // logs 1
- .then(carry(3)); // logs 2
Add Comment
Please, Sign In to add comment