I changed it from that signature for that reason, its now the last parameter of the first block with a default value. So you can call it like .distinctBy(_._2)