Refactoring: mapValues and ugly removal of compiler warning.
Implementation example with warning.