CFML implementation of Array.reduce() G'day
Just before I submit this to CFLib, it'd be great to get feedback:

&lt;cfscript&gt;
/**
* @hint CFML implementation of Array.reduce(), similar to Javascript's one ref https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce
* @array Array to reduce
* @callback Callback function to use to reduce. Will receive the following arguments: element (of current iteration of the all), index, array, (optional) result (of preceeding call to callback())
* @initialValue The initial value to use to start the reduction
*/

public any function arrayReduce(required array array, required any callback, any initialValue){
    var startIdx = 1;
    if (!structKeyExists(arguments, "initialValue")){
        if (arrayLen(array) &gt; 0){
            var result = callback(array[1], 1, array);
            startIdx = 2;
        }else{
            return;
        }
    }else{
        var result = initialValue;
    }
    for (var i=startIdx; i &lt;= arrayLen(array); i++){
        result = callback(array[i], i, array, result);
    }
    return result;
}    
&lt;/cfscript&gt;


I've created proper unit tests as a gist.
Interesting discussion! 

@AdamTuttle Regarding the behavior in Underscore that you've highlighted: 
I did some quick tests and found that the same behavior exists in Ruby and native JS (Chrome and FF). This confirmed my suspicions that this seemingly weird behavior is just a product of the reduce algorithm itself. 

In the algorithm, "memo" represents the current state of the fold operation. If you don't pass in an initial value, you're implying that the first element of the collection represents the initial state of the fold. From that perspective, the behavior you've shown is exactly what I'd expect. 

If you want to remove uppercase letters from a collection and convert that to a string in a functional way, it would make more sense to call filter() to and then reduce(). Example: 

adamArr = ['A','d','a','m'];
damArr = _.filter(adamArr, function (letter) { 
    var asciiCode = asc(letter); 
    return asciiCode &gt;= 97 &amp;&amp; asciiCode &lt;= 122;
};
damString = _.reduce(damArr, function (memo, letter) {
    return memo &amp; letter;
};