associateWithIndex

Returns a map of each element to its index in this iterable.

When an element occurs more than once, the index of its last occurrence wins. Keys are ordered by first occurrence.