mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 17:20:54 +07:00
14 lines
269 B
Java
14 lines
269 B
Java
// "Replace with lambda" "true-preview"
|
|
class Test {
|
|
interface Eff<A, B> {
|
|
B f(A a);
|
|
}
|
|
|
|
interface InOut<A> {
|
|
A run() throws IOException;
|
|
|
|
default <B> InOut<B> bind(final Eff<A, InOut<B>> f) {
|
|
return () -> f.f(InOut.this.run()).run();
|
|
}
|
|
}
|
|
} |