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

Add a way to iterate on non-primitives/visit specific slices for Listable #52

Open
Keats opened this issue Jun 3, 2021 · 0 comments
Open

Comments

@Keats
Copy link

Keats commented Jun 3, 2021

For example in templating engines, people will frequently print the value at the index n of an array. Right now keeping track of the indices of a Listable being visited is not triviall and as in the template engine case, we don't even want to visit all of them, just one.

Something like Listable::visit_slice(range: Range<usize>, &mut dyn Visit) to allow for more flexibility would be great to have. A .get(usize) would be nice too if possible

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