This calls out for a version of `compareLengths` that returns an ADT `LT`, `EQ`, `GT`. `compareLengths` and `hasLength` could also move to `Collections`.