code: function filterSubtrees(pred, tree) {
    return new RoseTree(
      tree.root,
      function() {
        return tree.children().filter(function(subtree) {
          return pred(subtree.root);
        }).map(filterSubtrees.bind(null, pred));
      }
    );
  }
docs: RoseTree a -> (a -> Bool) -> RoseTree a