Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lazy List With Generator and Iterator

Joe Wang
August 19, 2018

Lazy List With Generator and Iterator

An Intro to lazy list implementation with generator and iterator.

Joe Wang

August 19, 2018
Tweet

More Decks by Joe Wang

Other Decks in Programming

Transcript

  1. LAZY LIST WITH GENERATOR AND ITERATOR Joe Wang

  2. Lazy List in Haskell Examples:

  3. Can we do the same thing in JavaScript? Is there

    any structure is lazy in JavaScript?
  4. Lazy In JavaScript Function call

  5. Lazy In JavaScript Generator

  6. The Structure of Lazy List LAZY LIST SEQUENCE ITERATOR https://github.com/dtao/lazy.js

    5000+star
  7. Iterable Interfaces

  8. Iterable ITERABLE Array String Map Set for…of… …itor Array.from

  9. Infinite Fibonacci

  10. Generator

  11. Generator - repeat

  12. Generator - iterate

  13. Generator - cycle

  14. Generator - map/filter

  15. Generator - take

  16. Generator - take

  17. Usage

  18. Usage

  19. Usage

  20. None
  21. let’s wrap it

  22. The End https://github.com/nodew/lazyList