"Come now, let us settle the matter," says the Lord. "Though your sins are like scarlet, they shall be as white as snow; though they are red as crimson, they shall be like wool.”
A functions is a rule which assigns to each object in a domain set exactly one object in a codomain set. So, suppose that the domain set is the collection of behaviors that people do and the codomain consists of two values: perfect or imperfect.
On our own, every behavior that we do is mapped to the "imperfect" output value. But, the Jesus function takes our behavior and filters it through his sacrifice so that God takes the output of the behavior of Christians as "perfect" in terms of our final judgment. Praise God!