摘要:
参考这个http://www.cnblogs.com/wangshenhe/archive/2012/05/09/2490438.htmlhttp://www.cnblogs.com/zcttxs/archive/2012/06/12/2546293.htmlhttp://www.cnblogs.c... 阅读全文
摘要:
柯里化是把接受多个参数的函数变换成接受一个单一参数的函数,并且返回一个新函数,这个新函数能够接受原函数的参数。下面可以通过例子来帮助理解。function adder(num) { return function(x) { return num + x; }}var add5 = adder(5);... 阅读全文
摘要:
Item 24: Use a Variable to Save a Reference toargumentsAn iterator is an object providing sequential access to a collection ofdata. A typical API prov... 阅读全文
摘要:
Item 23: Never Modify the arguments ObjectThe arguments object may look like an array, but sadly it does notalways behave like one. Programmers famil... 阅读全文
摘要:
Item 22: Use arguments to Create Variadic FunctionsItem 21 describes a variadic average function, which can process anarbitrary number of arguments a... 阅读全文
摘要:
Item 21: Use apply to Call Functions with DifferentNumbers of ArgumentsImagine that someone provides us with a function that calculates theaverage of ... 阅读全文
摘要:
Junit源码设计模式欣赏JUnit是一个优秀的Java单元测试框架,由两位世界级软件大师Erich Gamma 和 Kent Beck共同开发完成。....向读者介绍在开发JUnit的过程中是怎样应用设计模式的。 阅读全文