mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
19 lines
377 B
Java
19 lines
377 B
Java
// "Replace with lambda" "true"
|
|
class Test {
|
|
interface Eff<A, B> {
|
|
B f(A a);
|
|
}
|
|
|
|
interface InOut<A> {
|
|
A run() throws IOException;
|
|
|
|
<B> InOut<B> bind(final Eff<A, InOut<B>> f) default {
|
|
return new In<caret>Out<B>() {
|
|
@Override
|
|
public B run() throws IOException {
|
|
return f.f(InOut.this.run()).run();
|
|
}
|
|
};
|
|
}
|
|
}
|
|
} |