import java.util.Arrays; import java.util.List; import java.util.function.BiFunction; import java.util.function.Function; import java.util.stream.Stream; abstract class Play { public void main(Stream stream, Stream anotherStream) { Stream stringStream = stream.map(o -> foo(i -> "")).flatMap(l -> l); } abstract Stream foo(Function mapper); static int foo() { return 6; } } class SimplePlay { { foo(y -> bar(x -> "")).substring(0); } interface Res { R apply(String s); } T foo(Res f) {return null;} K bar(Res f) {return null;} } class Test19 { interface Seq extends Iterable { static Seq of(Iterable source) { return null; } Seq map(Function mapper); Seq zip(BiFunction zipper, Seq other); } interface S extends Seq { static S copyOf(Iterable source) { return null; } } interface D extends S { } void test(Seq dseq) { BiFunction, Seq> f = (d, nums) -> dseq.map(s -> s.zip((text, num) -> text + num, Seq.of(nums))) .map(s -> S.copyOf(s)); } }