softwaremill/quicklens

Extracting given `F[_]` from modify function to the result.

bandrzejczak opened this issue · 0 comments

Given the code:

case class A(a: B)
case class B(b: Int)
def x(b: Int): Future[Int] = ???

I'd like to be able to write:

(a: A) => a.modify(_.a.b).using(x)

I'd expect it to yield Future[A]. I'd also expect it to work for any F[_] that has QuicklensFunctor type class instance.