-
Notifications
You must be signed in to change notification settings - Fork 157
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
feat: Add flatten operator. #937
Conversation
(for { | ||
i <- Source(1 to 5) | ||
j = Source(1 to i) | ||
} yield j).flatten |
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.
Use flatten
instead of flatMapConcat(identity)
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.
lgtm
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.
lgtm - now that #941 is merged
Motivation:
flatten
operator which can simplify the code for common usage.flatten
is well known for most scala developersflatten
operator.refs: #936
Cons:
Result:
Simpler code.