bigeasy / cadence

A Swiss Army asynchronous control flow function for JavaScript.
https://bigeasy.github.io/cadence
MIT License
35 stars 7 forks source link

Resurrect `async` to break. #314

Closed bigeasy closed 9 years ago

bigeasy commented 9 years ago

Pretty simple, actually.

bigeasy commented 9 years ago

Use async to break, but do not use async() or similar to retry. (Although you could always have async.repeat() as you do in Hotspot.)

bigeasy commented 9 years ago

Or, you could have async.done and async.repeat, which is a little more explicit and would work with 0 and Infinity respectively. Difficult aesthetic choice to make.

bigeasy commented 9 years ago

Do not need an index. You jump to start or end.

bigeasy commented 9 years ago

We're adding an if to see if there is a cadence specified, if so, let's do something, otherwise do nothing.

bigeasy commented 9 years ago

async can be an alias for async.break, but we can be adamant about async.continue.