Composition of convergent functions

Hi,

I'd appreciate some help with this question...

Quote:

Suppose that $\displaystyle f(x)\to l$ as $\displaystyle x\to a$ and $\displaystyle g(y)\to k$ as $\displaystyle y\to l$. Must it be true that $\displaystyle g(f(x))\to k$ as $\displaystyle x\to a$?

I'm thinking no, since from the definition of limit of a function we require "x not equal to a" for the limit of f(x) to exist. But here, we could have f(x) = l and then g(f(x)) isn't necessarily defined.

Is this right? If not then I could probably find a proof assuming f(x) is not l, but why could I do this?

Many thanks.