Functional diversity in fungi