Skip to content

Conversation

@TheRamenChef
Copy link

This pull request adds three new classes for a lambda implementation of Generator.

@mherrmann
Copy link
Owner

Thanks. Do you have some examples of their usage?

@TheRamenChef
Copy link
Author

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);
        }
    }
});

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

Successfully merging this pull request may close these issues.

2 participants