Difference between Iterator and Stream in Scala?

Stream memoises and Iterator does not. You can traverse the same Stream multiple times and get the same result each time. Iterator, on the other hand, can only be traversed once.

Leave a Comment