What other rules are there in mathematics? I'm reading Conceptual Mathematics: A First Introduction to Categories.

  
*
  
*a set $A$, called the domain of the map;
  
*a set $B$, called the codomain of the map;
  
*a rule assigning to each element $a$ in the domain, an element $b$ in the codomain.
  

This is almost the same I saw in the calculus books and I got curious with something: This rule is always an expression in which there's a substitution in it's values, it seems everything is reduced to a function, are there other kinds of rules? Are the rules that can't be reduced to functions? Until now, I guess I'm aware only about the functions and mappings.
 A: It is a common historical trend to unnecessarily assume that any function must be given by a formula of some sort. In the modern approach to mathematics this is absolutely not the case. The 'rule' in the explanation above of how to think of functions does not need to be a formula or even potentially expressible as one. 
More rigorously, a function $f:A\to B$ is a certain relation, that is a subset of $A\times B$. The cardinality of all functions $f:\mathbb R\to \mathbb R$ is greater than the cardinality of expressions of possible formulas and so there are more functions than there are formulas describing functions. 
It should be noted that some debate on the meaning of 'function' in calculus during the years of the formation of the subject existed. Things that today we accept as functions, such as the Dirichlet function and Bolzano's or Weiestrass' nowhere differentiable continuous functions, were not always considered functions. 
So, the use of the word 'rule' in your question is just a heuristic or mnemonic or intuitive concept to talk about what functions are in some intuitive plane. The definition of function employed today is set-theoretic and leaves no room for ambiguities (unless you consider the axiom of choice an ambiguity) or, I'm afraid, for your question. 
