MCPcopy Index your code
hub / github.com/clojure/clojure / kvreduce

Method kvreduce

src/jvm/clojure/lang/PersistentVector.java:427–439  ·  view source on GitHub ↗
(IFn f, Object init)

Source from the content-addressed store, hash-verified

425}
426
427public Object kvreduce(IFn f, Object init){
428 int step = 0;
429 for(int i=0;i<cnt;i+=step){
430 Object[] array = arrayFor(i);
431 for(int j =0;j<array.length;++j){
432 init = f.invoke(init,j+i,array[j]);
433 if(RT.isReduced(init))
434 return ((IDeref)init).deref();
435 }
436 step = array.length;
437 }
438 return init;
439}
440
441public Sequential drop(int n) {
442 if(n < cnt) {

Callers

nothing calls this directly

Calls 4

arrayForMethod · 0.95
isReducedMethod · 0.95
invokeMethod · 0.65
derefMethod · 0.65

Tested by

no test coverage detected