scala/grade-school: Fold over keys for readability.