In function learning, the to-be-learned function always defines the relationships between stimulus and response. However, when a function defines the stimuli by time points, we can call this type of function as time-varying function. Learning time-varying function would be different from learning other ones. Specifically, the correlation between successive stimuli should play an important role in learning such functions. In this study, three experiments were conducted with the correlations as positive high, negative high, and positive low. The results show people perform well when the correlation between successive stimuli is high, no matter whether it is positive or negative. Also, people have difficulty learning the time-varying function with a low correlation between successive stimuli. A simple two-layered neural network model is evident to be able to provide good accounts for the data of all experiments. These results suggest that learning time varying function is based on association between successive stimuli.