It's necessary to declare the type; here t_my_list; a collection is a TABLE OF something
CREATE OR REPLACE TYPE t_my_list AS TABLE OF VARCHAR2(100);
Here's the function. Notice the () used as a kind of constructor, and the COUNT and EXTEND keywords that help you create and grow your collection;
...