Pregunta de entrevista de Maplesoft

What is wrong with this function?