# How does Fermat's principle of least time follow from Huygen's principle?

When I was first introduced to Snell's Law, I was shown a derivation using Fermat's principle of least time. Using this same principle you can show that the angle of incidence must be equal to the angle of reflection. I was later again shown this, but instead of using Fermat's principle, all of this was derived using Huygen's principle. I think I've read somewhere that Fermat's principle can be mathematically derived from Huygen's principle. How can this be done?