I would like to create a command that: when an argument is given, it saves it "somewhere", and when no argument is given, it prints all saved arguments. Something like this:
\example{text1}
\example{text2}
\example{text3}
(not output)
\example
Output: text1,text2,text3
If this is not possible with the same command, there could be 2 different commands. I guess this is possible since some templates print the information of "\author" when calling \maketitle.
