Instead of lazy lists you probably want a streaming abstraction, such as
streaming
pipes
conduit
or a strict linear data structure, such as
Seq
Array
Vector
Using lazy lists leads to bugs such as
Haskell Reddit on when we really need lazy lists
The benefits are
Ed Kmett’s memo table (N.B. this has linear lookup time though – the memo table based on trees is much better)
take n . sort
(although this is possible with streams too, I
think)
As a unifying type for Alternative
’s many
See https://www.reddit.com/r/haskell/comments/6h84vg/when_do_we_really_need_lazy_lists/diwhzwf/