Scala Programming Language
  1. Scala Programming Language
  2. SI-5371

The description of flatMap and flatten is misleading

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Scala 2.9.1
    • Fix Version/s: None
    • Component/s: Documentation and API
    • Labels:
      None

      Description

      To quote:

      flatMap

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

      flatten

      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.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Philipp Haller
            Reporter:
            Daniel Sobral
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development