Data Structures: Sequences!

Haskell's basic "list" type works like a singly linked list. However, the lack of access to elements at the back means it isn't useful for a lot of algorithms. A double ended linked list (AKA a queue) allows a lot more flexibility.

In Haskell, we can get this double-ended behavior with the Sequence type. This type works like lists in some ways, but it has a lot of unique operators and mechanics. So it's worth reading up on it here in the latest part of our Data Structures Series. Here's a quick review of the series so far:

  1. Lists
  2. Sets
  3. Maps
  4. Hash Sets
  5. Hash Maps
  6. Arrays
  7. Vectors
  8. Sequences

We have one more structure to look at next time, so this series is going to bleed into August a bit, so make sure to come back next week!

Previous
Previous

Data Structures: Heaps!

Next
Next

Data Structures: Vectors!