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

Introduce range-over-func iter.Seq method All() for graph.EndpointPair #7

Open
jbduncan opened this issue Jan 13, 2024 · 1 comment

Comments

@jbduncan
Copy link
Owner

jbduncan commented Jan 13, 2024

Blocked on the currently-experimental range-over-func Go feature being merged into a stable version of Go.

This will allow the nodes of an endpoint pair to be iterated on with for loops, which is more flexible than introducing a ForEach method which may not allow early exits from the loop. Furthermore, it supports turning the nodes into a "pull iterator" with the proposed iter.Pull, which lets user control when the iterations happen.

@jbduncan
Copy link
Owner Author

For clarity, this would treat graph.EndpointPair as a two-element collection with a source and target node that the iterator would return.

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

1 participant