scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

Add Traversable.fromForeach to Traversable companion object #9049

Open scabug opened 9 years ago

scabug commented 9 years ago

I think it would be convenient to have a method that generates a traversable form a foreach function. Doing this manually is unnecessary boilerplate, and writing an enhancement is not completely straightforward.

See this discussion on scala-user for a possible implementation.

https://groups.google.com/d/msg/scala-user/PzqxBXfprds/j4rRMSFCEEgJ

scabug commented 9 years ago

Imported From: https://issues.scala-lang.org/browse/SI-9049?orig=1 Reporter: @rklaehn Affected Versions: 2.11.4

scabug commented 9 years ago

@Ichoran said: Yeah, that'd be nice to have. I think we'll have to put it off for a while to keep source compatibility.