:: (a -> b) -> [a] -> [b] package:language-ecmascript

Changes all the labels in the tree to another one, given by a function.