Two notes:
- Modifying collection values with `map` is a bit of a smell
- Place statements on separate lines to make more readable (I needed to look at it quite closely until I saw the `return`)