advanced_iterators: Added doctests to all the functions. Made minor changes to make sure the functions had reasonable behavior. Tested and they all passed.