How do I go about doing this in general?

I want to extend the List class to change just one function. how do I do it? Thanks.