Can we return a TypedPipe[(U, T)] here? I'm thinking if user is calling distinctBy, he/she probably is interested in using the distinct key later.