Too Long; Didn't Read
In this article, I will present a JavaScript ES6 implementation of a lazily-evaluated <a href="https://en.wikipedia.org/wiki/Linked_list" target="_blank">linked list</a> data structure. The recursively-defined linked list is an important collection type in many functional <a href="https://hackernoon.com/tagged/programming" target="_blank">programming</a> languages. In the <a href="https://haskell-lang.org/" target="_blank">Haskell language</a>, which inspired this project, the <a href="https://en.wikibooks.org/wiki/Haskell/Lists_and_tuples" target="_blank">list datatype</a> fills the role that arrays occupy in <a href="https://hackernoon.com/tagged/javascript" target="_blank">JavaScript</a>. Since this list type is defined using <a href="https://en.wikipedia.org/wiki/Recursion_%28computer_science%29" target="_blank">recursion</a>, it is possible to generate and evaluate list elements on demand, rather than at the time of the list’s creation (that’s the “lazy” part), thereby making infinite lists not only feasible but relatively straightforward.