V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
V2EX  ›  sonicthedgehog  ›  全部回复第 1 页 / 共 1 页
回复总数  2
@sonicthedgehog 不过这不是惰性计算,难受
class F {

public F() { }

public F apply(int i) {
return new F() {
@Override
public int get() {
return F.this.get() + i * i;
}
};
}

public int get() {
return 0;
}
}
已测试,通过
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4627 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 09:50 · PVG 17:50 · LAX 02:50 · JFK 05:50
♥ Do have faith in what you're doing.