More experimenting with functions.
Renamed method to avoid confusion with scala 'map'.