(IFn f, Object init)
| 425 | } |
| 426 | |
| 427 | public 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 | |
| 441 | public Sequential drop(int n) { |
| 442 | if(n < cnt) { |