Java 类java.util.stream.Streams 实例源码

项目:java-8-benchmarks    文件:VectorDotProducts.java   
public double timeLambdaDotProduct(int reps) {
    double result = 0;
    for (int i = 0; i < reps; i++) {
        result = Streams.zip(stream(x),stream(y),
                             (left, right) -> left * right)
                        .reduce(0.0, Double::sum);
    }
    return result;
}