摘要: # if we need it only once and it's quite simple def make_incrementor(n): return lambda x: x + n f = make_incrementor(2) print f(3) # filter, map, reduce foo = [2, 18, 9, 22, 17, 24, 8, 12, 27] prin... 阅读全文
posted @ 2017-11-22 14:14 blitheG 阅读(329) 评论(0) 推荐(0)
摘要: 摘自:http://www.cnblogs.com/kaituorensheng/p/4516983.html 函数式编程 命令式的编程风格已经成为事实上的标准。命令式编程的程序是由一些描述状态转变的语句组成。虽然有时候这种编程方式十分的有效,但有时也不尽如此(比如复杂性)——而且,相对于声明式编程 阅读全文
posted @ 2017-11-22 11:30 blitheG 阅读(270) 评论(0) 推荐(0)