mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-02 14:20:55 +07:00
17 lines
298 B
Java
17 lines
298 B
Java
class Tmp
|
|
{
|
|
interface BiFunction<T, U, R> {
|
|
R apply(T t, U u);
|
|
}
|
|
|
|
interface Sequence<T>
|
|
{
|
|
<R> Sequence<R> scan(R init, BiFunction<R, T, R> func);
|
|
}
|
|
|
|
static <T> void foo(Sequence<T> sequence){}
|
|
|
|
void test(Sequence<String> strings) {
|
|
foo(strings.scan(1, (i, s) -> 1));
|
|
}
|
|
} |