I would just do `def avg(vals): ...` above and reference it rather than sticking a lambda in a dict constant. I notice that you're protecting `avg` against empty lists. Perhaps `max` and `min` should get the same protection?