I present and defend the generalized selected effects theory (GSE) of function. According to GSE, the function of a trait consists in the activity that contributed to its
bearer’s differential reproduction, or differential retention, within a population. Unlike
the traditional selected effects (SE) theory, it does not require that the functional trait
helped its bearer reproduce; differential retention is enough. Although the core theory has been presented previously, I go significantly beyond those presentations by providing a new argument for GSE and defending it from a recent objection. I also sketch its implications for teleosemantics and philosophy of medicine.