R. Yishmael b. R. Yossi says:
One who learns with the aim of teaching others, the Almighty grants him the means to learn and teach.
One who learns so as to do what he learns, the Almighty grants him the means to learn, to teach others, and to do himself.