Function-valued functions can be confusing; I've always found that stepping through the notation in painstaking detail is very helpful.

By definition, h : S --> T

Therefore,

By definition of T, h(s) is a function

h(s)(i) is, therefore, evaluating h(s) at i. (And )