Fork me on GitHub
λ

The Daily Functor

2.0 Steps Forward, 1.0 Steps Back

Occasional* Musings on Programming in Scala by Douglas Alan

The Structure of Streams

Streams are a staple of functional programming. They were invented for the Scheme programming language, and then adopted and used heavily by Haskell. In fact, they are used so heavily in Haskell that all Lists in Haskell are really Streams. Streams offer a number of advantages for certain kinds of programming tasks, but due to differences between Scala and Scheme or Haskell, and for reasons that we will get into, in order to avoid exhausting the heap, more care has to be taken when using Streams in Scala than you would have to in either Scheme or Haskell.

(Read more...)

*Despite this blog's title, I'll be lucky if I even get to this once a month.