I am stuck on calculation that I cannot build the recursion into- I sucked at math, probably thats the problem.
Here is what I am trying to do:
Get a list of values. Go to the fist item of the list, do something with it and create a result,
go to the next item of the list; do something with it and create a result, add the result of this line to the result of the line before
end when I reached the last item of the list.
Output the result.
Here is what I have so far:
list= List (of a field);
$i = $i+1;
getitem=GetValue (list ; $i);
$result = getitem*dosomethingwithit
If ( $i = c; $result; getitem*dosomethingwithit + $result )
What am I doing wrong? I dont get the loop in my head in getting the calc to add to itself...