A function, according to Dirichlet, is any rule that produces new numbers from old. The rule does not have to be specified by an algebraic formula. In fact, there’s no reason to restrict your attention to numbers. A function can be any rule that takes objects of one kind and produces new objects from them.