Convergence for difference equations with vanishing time-dependence, with applications to adaptive learning