mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
24 lines
553 B
Java
24 lines
553 B
Java
import java.util.*;
|
|
|
|
class Main {
|
|
|
|
void test(List<Integer> li) {
|
|
Fun<Stream<Integer>, Stream<Integer>> f = s -> s.substr(0);
|
|
foo(li, f, Collections.emptyList());
|
|
|
|
foo(li, s -> s.substr(0), Collections.emptyList());
|
|
}
|
|
|
|
<T, U, S_OUT extends Stream<U>, It extends Iterable<U>> Collection<U>
|
|
foo(Collection<T> coll, Fun<Stream<T>, S_OUT> f, It it) {
|
|
return null;
|
|
}
|
|
|
|
interface Stream<T> {
|
|
Stream<T> substr(long startingOffset);
|
|
}
|
|
|
|
interface Fun<T, R> {
|
|
R f(T t);
|
|
}
|
|
} |