NICTA/scoobi — pull request #230 by espringe (2013-03-31 06:39:48+00:00)
Title: Implement DList equality (#190)

It's a bit trickier than I thought, but I think it's a pretty decent solution.

The single-pass iterable stuff is makes it pretty difficult -- I wanted to use controlled recursion (for efficiency) over a fold -- but in the end, I had to go with getting the `.iterator` and using that directly. It's not as functional, but way saner than trying to work with an iterable that may or may not change when you read from it :D

I'd actually be in favor of a short term solution of `groupByKey` returning an `DList[(A, Iterator[K])` and a long term solution of an awesome `DMap[K,V]` (which would have other benefits, like guarantee'ing the uniqueness of K)

Anyway, enjoy DList equality >: D