The flatten-group-print approach seems more robust to me, because we avoid the assumption that the given input is already grouped.
I also like this approach because we perform our data transformations first and then worry about printing, whereas the original approach kinda mixes it all together and hurts my feeble brain.
Regarding the assumption of pre-grouped tuples, I was talking about continuing to accept the original list-of-lists, perhaps due to a limitation of the source, e.g.:
[[{5,2}], [{10,2}, {4,5}], [{6,5}, {3,10}, {2,15}]]
|> List.flatten()
|> Enum.group_by(fn {a, b} -> a * b end)
|> ...
But I agree that a single list of tuples would be a preferable input format, if the source can provide it.
Thanks @OvermindDL1 and @Ted for your help.
The filtering at the source using List.flatten looks much better. Applied that. And there goes my first project in Elixir. Thank you for your help. Elixir!