Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fix: resolve bugs from bash #1597
fix: resolve bugs from bash #1597
Changes from 1 commit
8d9d07d
0bae850
b34bb30
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this for sure works, I think its not the most efficient approach though.
could we instead use a .reduce here and verify uniqueness in the accumulator ourselves then join that together?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I had gone back and forth on this decision here in development... I was feeling that using reduce() as a filter/map replacement sacrifices more readability than it would gain in efficiency (if I'm understanding correctly that it would have a linear runtime either way, just one less iteration). The lack of readability is coming from my personal difficulty in reading reduce functions that aren't reducing an array to a single value as intended. Much of this was inspired by this video and basically summarized here. Can also recognize that using set in this way may be less readable than a map + filter combo which I could also do and would definitely pull out into a helper. I'm totally good to change this to any of these, but just wanted to get your thoughts on these pieces first and see what you'd prefer @YazeedLoonat