I have a lot of functions to use in a iterative way, and I need some of the calculation results. For example:
func = Function[{s}, s Sin[#] &] /@ Range[100];
ComposeList[func, x][[1 ;; ;; 10]]
Apparently, this code calculates much more than necessary. Especially, a lot of time is needed for the calculation when the length of func list is very long and when the Function is very complicated (e.g. Length@func = 1024 and the function is Fourier);
Is there any elegant way to reduce the calculation?
Edit
Perhaps I should say more about the fact that this code calculates than necessary.
For example,
func = Function[{s}, s Sin[#] &] /@ Range[10];
result=ComposeList[func, x][[1 ;; ;; 5]]
(*
{x, 5 Sin[4 Sin[3 Sin[2 Sin[Sin[x]]]]], 10 Sin[9 Sin[ 8 Sin[7 Sin[6 Sin[5 Sin[4 Sin[3 Sin[2 Sin[Sin[x]]]]]]]]]]}
*)
Now we can see that result[[2]] (i.e., 5Sin[4 Sin[3 Sin[2 Sin[Sin[x]]]]]) is also appeared inside result[[3]] (i.e., 10Sin[...5Sin[4 Sin[3 Sin[2 Sin[Sin[x]]]]]], so the evaluation for 5Sin[4 Sin[3 Sin[2 Sin[Sin[x]]]]] is repeated twice here.
The repetition will be very large with an increase of Length[func], which will be much more time-consuming than it is required. This is my point here (Up to now, Rojo has gotten the point and solved it ).

Table[(Composition @@ Reverse[Take[func, k]])[x], {k, 0, 100, 10}]do what you want? – J. M.'s missing motivation Jul 07 '12 at 06:49ComposeListis normally quite efficient. Is there some symbolic pre-simplification that you what to leverage in your application? – Mr.Wizard Jul 07 '12 at 10:10list = Table[(Print@#; #) &, {5}]; ComposeList[list, "print me"];- you will see that it is only printed five times. – Mr.Wizard Jul 07 '12 at 14:41