摘要:
Java 23 Design Patterns 有一个模板设计模式,先看下以下的高阶函数代码var s = function(x, y) { return x + y;}var p = function(x, y) { return x * y;}var h = function(f, x, y) { return f(x, y);}h(s, 2, 5); // 7h(p, 2, 5); // 10再看Java代码:CodeBlock#2public interface Caculator { public int caculate(int x, int y);}pub... 阅读全文
posted @ 2013-12-27 20:55
unisgn
阅读(358)
评论(0)
推荐(0)
浙公网安备 33010602011771号