Evolution of the definition of function

How do you define function? Do you teach relation first before teaching function?  Does knowing about relation a pre-requisite to function understanding? The concept of function “was born as a