document tree_map and tree_transform, and make tree_map more expressive
adapt text_of_raw to work with the modified tree_map
documentation