Hey. I've just started learning how to program in maple. Anyways, I was trying to write a simple procedure for number of compositions of a given integer x-without just using 2^(x-1).
Here's my procedure and the corrosponding error message
> CompositionsI := proc (x) evalf(sum(binomial(x-1, i), i = 1 .. x-1), 10) end proc();
Error, invalid input: unknown uses a 1st argument, x, which is missing
>
I have no idea why having the x in there would cause a problem, so any help would be much appreciated.
THanks