2013年12月27日

摘要: 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)
摘要: variable:operator 阅读全文
posted @ 2013-12-27 20:01 unisgn 阅读(67) 评论(0) 推荐(0)

导航