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 FlatMap Operation #117

Merged
merged 9 commits into from
Jul 1, 2021
Merged

Add FlatMap Operation #117

merged 9 commits into from
Jul 1, 2021

Conversation

AlexandruGG
Copy link
Collaborator

@AlexandruGG AlexandruGG commented Jun 27, 2021

This PR adds the FlatMap Operation.

  • has tests
  • has static analysis check
  • has documentation
  • clarify key types and normalize usage

Bonus, static analysis checks:

  • flatten
  • unwrap

src/Operation/FlatMap.php Outdated Show resolved Hide resolved
@drupol
Copy link
Collaborator

drupol commented Jun 28, 2021

I really like the fact that the map callback can return any type of iterable, this will still continue to work !

@AlexandruGG
Copy link
Collaborator Author

I really like the fact that the map callback can return any type of iterable, this will still continue to work !

Nice observation! I'll add some unit tests to the relevant operations to ensure that behaviour doesn't break by accident

@AlexandruGG AlexandruGG changed the title [WIP] Add FlatMap Operation Add FlatMap Operation Jul 1, 2021
@AlexandruGG
Copy link
Collaborator Author

AlexandruGG commented Jul 1, 2021

@drupol I think this is ready but have a look at the types, tests, and docs and see if everything is as you'd expect from this

@AlexandruGG AlexandruGG marked this pull request as ready for review July 1, 2021 18:36
@drupol
Copy link
Collaborator

drupol commented Jul 1, 2021

All good, maybe next time it would be better to separate a new feature from the small refactoring, I prefer when PRs are clearly scoped.

@drupol drupol enabled auto-merge (squash) July 1, 2021 18:52
@drupol drupol disabled auto-merge July 1, 2021 18:52
@drupol drupol merged commit 433ab2c into master Jul 1, 2021
@drupol drupol deleted the feature/flat-map-operation branch July 1, 2021 18:52
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.

None yet

2 participants