I'm guessing it constructs the whole array upfront. Maybe there's a generator way to do it too.
Reply on news.ycombinator.com