News for hackers. Stuff that matters.
Re:The New Haskell Homepage by exDM69 on Saturday July 12, 2014 @01:08PM (#8025087)
> you can create a value just like any other iterable sequence that happens to be a generator for the infinite series of integers...

I know that. Almost every language out there has some kind of generator/iterator protocol for "lazy" sequences. But they're not a list like any other list out there. You can (usually) iterate through them only once.

And you can't apply a generator/iterator type of deal to, say, a tree structure or any other non-linear data structure.

In Haskell, every value works like that (unless you explicitly tell otherwise). This is what the "primes" example is trying to show.

There are no comments on this comment yet.