Maplesoft Interview Question

What is wrong with this function?