I have the problem in some generic code that I require an accumulator or more precisely a mutable variable to hold a temporary in a loop. The code is part of a Reduce i