Skip to content

Instantly share code, notes, and snippets.

@faithandbrave
Created March 13, 2012 13:28
Show Gist options
  • Save faithandbrave/2028736 to your computer and use it in GitHub Desktop.
Save faithandbrave/2028736 to your computer and use it in GitHub Desktop.
#include <iostream>
#include "amb.hpp"
void amb1_f(amber& cont)
{
cont.suspend(1);
cont.suspend(2);
cont.suspend_break(3);
}
void amb2_f(amber& cont)
{
cont.suspend(4);
cont.suspend_break(5);
}
int main()
{
{BLOCK(ctx) {
amber& x = amb(ctx, 0, amb1_f);
amber& y = amb(ctx, 1, amb2_f);
std::cout << x.get() << ", " << y.get() << std::endl;
};}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment