We describe an emerging framework for understanding variation, selection and evolution of phenotypic traits that are mathematical functions. We use one specific empirical example--thermal performance curves (TPCs) for growth rates of caterpillars - to demonstrate how models for function-valued traits are natural extensions of more familiar, multivariate models for correlated, quantitative traits. We emphasize three main points. First, because function-valued traits are continuous functions, there are important constraints on their patterns of variation that are not captured by multivariate models. Phenotypic and genetic variation in function-valued traits can be quantified in terms of variance-covariance functions and their associated eigenfunctions: we illustrate how these are estimated as well as their biological interpretations for TPCs. Second, selection on a function-valued trait is itself a function, defined in terms of selection gradient functions. For TPCs, the selection gradient describes how the relationship between an organism's performance and its fitness varies as a function of its temperature. We show how the form of the selection gradient function for TPCs relates to the frequency distribution of environmental states (caterpillar temperatures) during selection. Third, we can predict evolutionary responses of function-valued traits in terms of the genetic variance-covariance and the selection gradient functions. We illustrate how non-linear evolutionary responses of TPCs may occur even when the mean phenotype and the selection gradient are themselves linear functions of temperature. Finally, we discuss some of the methodological and empirical challenges for future studies of the evolution of function-valued traits.