Reputation: 1776
Why does Haskell have Data.Sequence? Aren't (lazy) lists already the most general forward iterators possible (by virtue of being free monoids)?
Upvotes: 3
Views: 1060
Reputation: 11218
The details are mentioned on the first paragraph on hackage. As pointed by @AndrewC they offer many operations efficiently example concatenating two sequences, viewing the right end of a sequence or adding elements at the end of a sequence.
Upvotes: 14