Hacker News new | ask | show | jobs
by Ovid 3737 days ago
I'm confused. What's so hard to reason about that? It's very obvious that it prints 2016. Maybe "infinite lazy lists" isn't something that most mainstream languages consider, but honestly, they're very handy and hardly "self-indulgent mucking about."

(Though I'd probably use an asterisk instead of the infinity symbol)

2 comments

Indeed, if we're going to hold up Haskell as an exemplar of simplicity—which, in its philosophy if not always in its implementation, I think it is—then we can hardly ding Perl for including lazy lists!
I have no problem with lazy lists. It's the "0, 2 ... \infty" expression which offends me.