Enum.group_by(&(&1.species)) is exactly equivalent to Enum.group_by(& &1.species). The parens for & are always optional. The formatter removes them because they’re unnecessary. It doesn’t remove the {} in Jose’s example because those are part of the actual datastructure definition.
1 Like






















