public static void main(String[] args) {
var s1 = Stream.of(2, 1, 3); // Stream < Integer >
var s2 = s1.zip(List.of(7, 8, 9)); // Stream <Tuple2< Integer, Integer >>
var integers = s2.map(tuple2 -> tuple2._1 + tuple2._2).collect(Collectors.toList());
integers.forEach(System.out::println);
}
repositories {
mavenCentral()
google()
maven {
url = uri("https://repo1.maven.org/maven2/")
}
}
repositories {
mavenCentral()
google()
maven {
url "https://repo1.maven.org/maven2/"
}
}