package yokohama.unit.util;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import lombok.Value;

@Value
public class Pair<T, U> {
    private final T first;
    private final U second;

    public static <T, U> List<Pair<T, U>> zip(List<T> firsts, List<U> seconds) {
        if (firsts.size() != seconds.size())
            throw new IllegalArgumentException("List size not match");

        return IntStream.range(0, firsts.size())
                .mapToObj(i -> new Pair<T, U>(firsts.get(i), seconds.get(i)))
                .collect(Collectors.toList());
    }
}

@@ -48,16 +48,55 @@
 .List;%0D%0A
+import java.util.function.BiFunction;%0D%0A
 import j
@@ -274,24 +274,120 @@
  second;%0D%0A%0D%0A
+    public %3CR%3E R map(BiFunction%3CT, U, R%3E f) %7B%0D%0A        return f.apply(first, second);%0D%0A    %7D%0D%0A%0D%0A
     public s

Add Pair.map method