I think it's okay. It's much clearer when looking at the full source file, `foreach` is defined directly above it. However, can you add a brief comment explaining what `EdgePartition.groupEdges` does?