✨generator examples
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
JS⟩ iteration ⟩ custom generators
*list() - finite arithmetic sequence.
*integers() - infinite non-negative integers: 0, 1, 2, 3 ...
*fibonacci() - infinite/finite fibonacci numbers: 1, 1, 2, 3, 5, 8 ...
- yield values sequentially.
- interleave the values of s.
- zip s into a single .