how to implement doubly linked lists
It isn’t really practical to have a doubly linked list in Haskell, because you have to construct it all at once. For example, imagine that you have a list [1, 2, 3, 4, 5] that you want to make doubly linked. Now, let’s imagine how the list is represented: data DoubleList a = LeftEnd a … Read more