I am trying to understand the concept of a natural transformation by considering the following example, an exercise from Mac Lane's Categories for the working mathematician (p. 18, ex. 1):
Let $S$ be a fixed set and denote by $X^S$ the set of all functions $S\to X$. Show that $X\mapsto X^S$ is the object function of a functor $\textbf{Set}\to \textbf{Set}$ and that evaluation $e_X:X^S\times S\dot{\to} X$, defined by $e(h,s)=h(s)$, the value of the function $h$ at $s\in S$, is a natural transformation.
I am having problems with both parts of the question. First of all, I am not sure how to show that $X\mapsto X^S$ is the object function. I need to check the two axioms of a functor, the identity property is easy, since for any functor $T:\mathbf{Set}\to\mathbf{Set}$ and a set $A$ we can define $T(\mathrm{id}_A)=\mathrm{id}_{A^S}$. I also need to show that for any composite of morphisms $g\circ f$ we have $$ T(g\circ f)=Tg\circ Tf $$ Given a function $f:A\to B$, how to define a function $Tf:A^S\to B^S$? Suppose that $h:S\to A$ is an element of $A^S$, can I define the image of $h$ under $Tf$ to be the function $g=f\circ h$? Does $T$ then satisfy the composition axiom?
Another problem is that a natural transformation is defined for two functors, whereas here I am only given one. What is the second functor?