3 ms·
It made sense to me to think of a lazy list as a cute way to write an eager generator method, but the implication you should ever use a linked list for anything
by astrange 10y ago
It made sense to me to think of a lazy list as a cute way to write an eager generator method, but the implication you should ever use a linked list for anything is unfortunate.
- mbrock 10y agoGHC has the `IsList` type class which basically allows overloading the list syntax to create any other sequential container. It still uses linked lists as an intermediate representation (the type class consists of a function `fromList :: [a] -> t a`) but since lazy lists are generators this is quite sensible.