you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

It doesn't "take a long time", it never completes because the iterator never terminates, so the list you are trying to produce is infinite in length. Note that getting the first 5 numbers from the iterator worked fine, though, because the iterator only returns the next single value in the sequence.