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

The description of flatMap and flatten is misleading #5371

Closed
scabug opened this issue Jan 13, 2012 · 1 comment
Closed

The description of flatMap and flatten is misleading #5371

scabug opened this issue Jan 13, 2012 · 1 comment
Assignees
Labels
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Jan 13, 2012

To quote:

flatMap
bq. Builds a new collection by applying a function to all elements of this $coll and concatenating the results.

flatten
bq. Converts this $coll of traversable collections into a $coll in which all element collections are concatenated.

This strong suggests that these methods are equivalent to reduceLeft(_ ++ _), in that the type of the result depends on the type of the elements, not the type of $coll.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jan 13, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5371?orig=1
Reporter: @dcsobral
Affected Versions: 2.9.1

@scabug scabug closed this Jan 2, 2015
@scabug scabug added this to the 2.10.0 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.