这里真的很简单.看完镜头的精彩介绍后:
http://www.youtube.com/watch?v=efv0SQNde5Q
我想我可能会尝试谈谈中的一个简单例子:
import scalaz.Lens._
fst.andThen(snd).set(((1,2),3),9)
Run Code Online (Sandbox Code Playgroud)
之后是这个错误
error: type mismatch;
found : scalaz.Lens[(Nothing, Nothing),Nothing]
required: scalaz.Lens[(Nothing, Nothing),C]
Note: Nothing <: C, but class Lens is invariant in type B.
You may wish to define B as +B instead. (SLS 4.5)
fst.andThen(snd).set(((1,2),3))
^
Run Code Online (Sandbox Code Playgroud)
有关如何使这项工作的任何想法?