This operator is used to create threads as opposed to lists. Consider the same code fragment with simple minuses:
def from(n: Int): List[Int] = n :: from(n + 1)
running this method will StackOverflowError . But with Stream[Int] tail is evaluated lazily only when necessary (and already calculated values ββare remembered).
source share