/** * zip 4 Streams into 1 * * <pre> * {@code * List<Quadruple<Integer,Integer,Character,String>> list = of(1,2,3,4,5,6).zip4(of(100,200,300,400),of('a','b','c'),of("hello","world")) .collect(Collectors.toList()); * } * //[[1,100,'a',"hello"],[2,200,'b',"world"]] * </pre> */ public final <T2,T3,T4> SequenceM<Quadruple<T,T2,T3,T4>> zip4(Stream<T2> second,Stream<T3> third,Stream<T4> fourth){ return zip3(second,third).zip(fourth).map(t -> new Quadruple(t._1()._1(), t._1()._2(),t._1()._3(),t._2())); } /**