Skip to content

Rewrite: breakOut (fix #46) #70

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

Merged
merged 2 commits into from
Jun 29, 2018
Merged

Conversation

MasseGuillaume
Copy link
Contributor

No description provided.

Copy link
Contributor

@julienrf julienrf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo, this is AWESOME! I’ve left a few minor comments but that looks great!

val xs = List(1, 2, 3)

xs.collect{ case x => x }(breakOut): Set[Int]
xs.flatMap(x => List(x))(breakOut): Set[Int]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also try with a sorted result? SortedSet[Int] for instance.

xs.scanLeft(0)((a, b) => a + b)(breakOut): Set[Int]
xs.union(xs)(breakOut): Set[Int]
xs.updated(0, 1)(breakOut): Set[Int]
xs.zip(xs)(breakOut): Array[(Int, Int)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try with a Map[Int, Int]?

op match {
case operatorsIterator(_) => "iterator"
case operatorsView(_) => "view"
case _ => throw new Exception("impossible")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment referring to the definition of operatorSymbols, explaining why that makes that path impossible to reach?

@MasseGuillaume
Copy link
Contributor Author

@julienrf all comments addressed.

@julienrf julienrf merged commit 3dd389f into scala:master Jun 29, 2018
martijnhoekstra pushed a commit to martijnhoekstra/scala-collection-compat that referenced this pull request Nov 9, 2022
version bumps, and modernize .travis.yml
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.

2 participants