fapply function

Apply a function to a forest of trees.