Maplesoft interview question

What is wrong with this function?