摘要: 函数式访问器在haskell里被叫做Lens。在面向对象语言里这个没有什么必要,不过作为练习,我们看如何在scala表示van Laarhoven lens.先给出haskell里的lens类型:type Lens s a = forall f. Functor f => (a -> f a) ->... 阅读全文
posted @ 2015-03-16 12:40 wehu 阅读(780) 评论(0) 推荐(0) 编辑