map.traits function

Maps a trait on a tree