lib/RoseTree.js
function fmap(f, tree) {
  return new RoseTree(
    f(tree.root),
    function() {
      return tree.children().map(fmap.bind(null, f));
    }
  );
}
function fmap(f, tree) {
  return new RoseTree(
    f(tree.root),
    function() {
      return tree.children().map(fmap.bind(null, f));
    }
  );
}
(a -> b) -> RoseTree a -> RoseTree b