quicklens
quicklens copied to clipboard
Modify deeply nested case class fields
adding a failing test for [#41](https://github.com/adamw/quicklens/issues/41)
``` case class Test[T](a: T, b: Int) Test("1", 1).modify(_.b).setTo(10) ```
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) =>...
Hi, I'm using quicklens 1.4.11 and com.softwaremill.common tagging v 2.2.0. I'm unable to modify a value containing tagged datatypes. For example : ```scala import com.softwaremill.tagging._ import com.softwaremill.quicklens._ case class A(data:...
Hi, Given a nested chain of `Option`s, is there a way to coerce the most inner one to `Some`? The current operator `.each` allows traversing `Option`s, but acts like `map`:...
Is there any way to compose only PathModifies? Something like following: ```scala case class A(b:B) case class B(c:C) case class C(value:Int) val a = A(B(C(0))) val mod1 = a.modify(_.b) val...
Any interest in supporting polymorphism and type change? ``` scala case class Street[+A](name: A) case class Address[+A](street: Option[Street[A]]) case class Person[+A](addresses: List[Address[A]]) val p2 = modify(person)(_.addresses.each.street.each.name).using(_.length) ```
Hi, Currently up to version 1.4.4 is available on maven central for scala 2.10, I was wondering whether you are planning on releasing quicklens 1.4.7 (containing the `when` operator) for...
Is it possible to use 'modifyAll' and something like 'setTo' to set multiple fields without doing duplicate copy operations? In the example code I only see modifyAll being used with...
This would allow supporting arbitrary lens. ``` scala trait Lens[A, B] { def modify(a: A, f: B => B): A } object EnglishVovels extends Lens[String, Char] { def modify(string: String,...