scala-extensions
scala-extensions copied to clipboard
distinctBy does not work infinite scala.Stream
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.