18
DEC
「读书笔记:Concurrency in .Net」Compose&Closure
函数组合 <table class="table"> <thead> <tr> <th>流水线</th> <th>函数组合</th> </tr> </thead> <tbody> <tr> <td>每个函数输出是下一个函数输入</td> <td>返回多个函数组合而成的新函数</td> </tr> <tr> <td>立即求值</td> <td>延迟求值</td> </tr> </tbody> </table> Example: 咖啡豆 -> 磨豆 -> [咖啡粒] -> 冲咖啡 -> [咖啡] 使用链的方式调用 FuncBeans,Ground grind = beans = new Ground(beans); FuncGround,Coffee brew = ground = new Coffee(ground); Coffee coffee = brew(grind(beans)); …