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

Improve service action syntax even more #7

Open
hator opened this issue Apr 7, 2017 · 1 comment
Open

Improve service action syntax even more #7

hator opened this issue Apr 7, 2017 · 1 comment
Milestone

Comments

@hator
Copy link
Collaborator

hator commented Apr 7, 2017

Additional improvement of action syntax after #5.

This:

{get | sum >= data[0] && count >= 2 } -> {
  count = count - 1;
  sum = sum - data[0];
  data = data[1..3] + [0];
  return :ok;
}

Becomes this:

get(sum >= data[0] && count >= 2) {
    count = count - 1;
    sum = sum - data[0];
    data = data[1..3] + [0];
    return :ok;
}

or this:

get() {
  if(sum >= data[0] && count >= 2) {
    count = count - 1;
    sum = sum - data[0];
    data = data[1..3] + [0];
    return :ok;
  } else {
    wait;
  }
}
@hator hator added this to the Rybu 2.0 milestone Apr 7, 2017
@zyla
Copy link
Owner

zyla commented Apr 7, 2017

🍕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants