scala-extensions icon indicating copy to clipboard operation
scala-extensions copied to clipboard

distinctBy does not work infinite scala.Stream

Open xuwei-k opened this issue 8 years ago • 1 comments

xuwei-k avatar Apr 13 '17 08:04 xuwei-k

IIRC I took the implementation of def distinct in the std lib and modified it. That would mean .distinct probably has the same problem. I can imagine an implementation that keeps the known ones around as it lazily goes through the collection and skips the ones already seen.

cvogt avatar Apr 13 '17 14:04 cvogt