public static < E , R > R reduce ( E [ ] array , BiFunction < R , E , R > function , R init ) { return new Reductor <> ( function , init ) . apply ( new ArrayIterator < E > ( array ) ) ; }
Reduces an array of elements using the passed function .