java-generator-functions
java-generator-functions copied to clipboard
Add a lambda implementation
This pull request adds three new classes for a lambda implementation of Generator.
Thanks. Do you have some examples of their usage?
For example:
new LambdaGenerator<Integer>(g -> {
g.yield(0);
for (int i = 0; i < 10; i++) {
g.yield(i);
for (int j = 0; j < 10; j++) {
g.yield(i + j);
for (int k = 0; k < 10; k++)
g.yield(i + j + k);
}
}
});