Why does Haskell have Data.Sequence? Aren't (lazy) lists already the most general forward iterators possible (by virtue of being free monoids)?
1 Answer
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.
index, which gets ani-th element in O(log(min(i,n-i))) time. For lists, the complexity is O(i).