Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

very low: stop as argument for loop and cycle #51

Closed
betula opened this issue Mar 21, 2021 · 1 comment
Closed

very low: stop as argument for loop and cycle #51

betula opened this issue Mar 21, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@betula
Copy link
Member

betula commented Mar 21, 2021

loop(async (stop) => {
  const data = await action;
  if (stop.val) return;
  // ...
});

loop(function* (stop) {
  const data = yield action;
  // ...
});

cycle((stop) => {
  this.a = a.val;
});

You need to take this as a shortcut to the stoppable mechanism.

@betula betula added the enhancement New feature or request label Mar 22, 2021
@betula
Copy link
Member Author

betula commented Jun 8, 2021

The loop removed in 0.6.0
cycle with stop function as a first argument added to "the stream of conciseness 0.7+ roadmap"

@betula betula closed this as completed Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant