Here you can find the source of zip(List
public static List<Double> zip(List<Double> a, List<Double> b)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static List<Double> zip(List<Double> a, List<Double> b) { List<Double> out = new ArrayList<Double>(); for (int i = 0; i < Math.min(a.size(), b.size()); i++) out.add(a.get(i) * b.get(i)); return out; }// w w w . java 2 s . c o m }