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

Implement lazy sets #4

Open
marcelocantos opened this issue Nov 24, 2019 · 0 comments
Open

Implement lazy sets #4

marcelocantos opened this issue Nov 24, 2019 · 0 comments
Labels
P1 Medium priority

Comments

@marcelocantos
Copy link
Collaborator

marcelocantos commented Nov 24, 2019

frozen.LazySet should be implemented over the top of frozen.Set. Considerations:

  1. Consider whether frozen.LazyMap is warranted. frozen.Map doesn't have many algebraic operations, at least not yet.
  2. Incremental caching: As the LazySet materialises, cache all values seen so far in a Set.
  3. Allow generative, quasi-infinite lazy sets such as AllUints(). These could be bounded by filters: AllUints().Where("$ < 10").
  4. LazySet might need more fine-grained semantics for better optimisations. One example comes to mind: Instead of just IsEmpty() and Count(), it might be useful to have CountUpTo(n int), which will return the count up to a maximum of n, where a return value of n implies Count() ≥ n. This avoids problems with infinite lazy sets.
@ChloePlanet ChloePlanet added the P1 Medium priority label Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants