scala example for map functions