Question: Please help in coding the insertion sort algorithm in maple

I need help coding the insertion sort algorithm in maple 17. So far, I have the following ..

 

I think I have syntax error but I'm rusty with maple and cant figure out what it is. The output for this is the list just as entered. It doesnt sort. Only returns the entered list. Please take a look at what I have and possible point out my mistake to me. Thank you in advance.

Please Wait...