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 "recursive" version of existing operators #3

Open
4 tasks
bartop opened this issue Nov 24, 2017 · 0 comments
Open
4 tasks

Implement "recursive" version of existing operators #3

bartop opened this issue Nov 24, 2017 · 0 comments

Comments

@bartop
Copy link
Owner

bartop commented Nov 24, 2017

"Deep" versions of algorithms would work for nested enumerables without breaking this nested hierarchy. For example:

const auto input = { (std::vector{1, 2}), (std::vector{3, 4, 5}), (std::vector{6}) };
const auto output1 = input | deep_filter([](const auto &i){ return i >=2; });
// output1 is now {{2}, {3, 4, 5}, {6}}

const auto output2 = input | deep_filter([](const auto &i){ return i < 6; });
// output2 is now {{1, 2}, {3, 4, 5}, {}}

I will gladly disscuss pros and cons of keeping the empty containers inside hierachy.

Our TODO list is:

  • transformed
  • sorted
  • filtered
  • flattened
@bartop bartop changed the title Implement "deep" version of existing filter operator Implement "deep" version of existing operators Nov 26, 2017
@bartop bartop changed the title Implement "deep" version of existing operators Implement "recursive" version of existing operators Feb 1, 2018
@bartop bartop added this to Inbox in bartop/tpl Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant