Let X and Y are Metric spaces and X is compact

f:X--> Y is locally Lipschitz continuous for every xo in X there exists a ball B(xo)

how to prove f is globally Lipschitz continuous for all x,y belongs X

st d(f(x),f(y))<=Ld(x,y)

Can anyone help with this problem.

Thank you