Pergunta de entrevista da empresa Appian

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