Domanda di colloquio di Appian

We need you to code a function that returns the first repeated element or a list