// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

js> function diff(acc, val) { return acc - val; };

js> [1, 4, 9, 16].reduceRight;
function reduceRight() { [native code for Array.reduceRight, arity=1] }

js> [1, 4, 9, 16].reduceRight(diff);
2

js> Array.reduceRight;
function reduceRight() { [native code for Array.reduceRight, arity=1] }

js> Array.reduceRight([1, 4, 9, 16], diff);
2
