Clearly the idea of generating function
s isn't limited to number
Functions can also be used to generate sets of strings.
This is what grammars do in formal language theory.
There are also graph grammars, grammars on commutative strings, and on other kinds of objects.
A related subject is inference rules in logic. Inference rules can often be seen as functions to generate sets of logical propositions from an initial set. Such an inference is a deduction (logical derivation, proof). One way to look at different systems of logic is to think of them as systems of generating functions of propositions. The study of their mathematical properties is often nontrivial and of great practical relevance - in particular, in the case of systems for automated reasoning, the study of computational aspects such as the efficiency with which derivations can be obtained.