A function, from set X to set Y, is a set of ordered pairs, first member an element of X, second member an element of Y, such that two pairs cannot have the same first member but different second members.
An example would be with X the set of students in your class, Y numbers. The set of ordered pairs would be a student and the student's weight. Two students might have the same weight but a single student would not have two different weights. This is, of course, the same Fantini's definition with his rule telling how the pairs are formed, my pairs defining his rule.