I don’t see it as that. flatten for lists - flattens multiple levels. So what is the word “flat” in flat_map? It’s flatten. What does flatten do here? It’s flattening a single level. Why? It’s inconsistent with flatten for lists.
I think it should be named concat_map because of what it does. Not flattening, concatenating. And by the way, in the docs we have exactly that:
conceptually, this is similar to a combination of map/2 and concat/1.
Link: Enum — Elixir v1.14.2


















