I am trying to use a small snippet of Shapeless example code:
import shapeless._
case class Person(name : String, age : Int)
val ageLens = lens[Person].age
val person = Person("Joe Grey", 37)
val person2 = ageLens.set(person)(38) // Error: Cannot find set method
For some reason it cannot find the set
method. Why not?
This code is straight from the examples here: https://github.com/milessabin/shapeless/blob/master/examples/src/main/scala/shapeless/examples/lenses.scala