Nick
Nick
Regarding the third limitation, `PathModifyPoly` can be declared with bounds in mind using the technique below, so that it can be properly inherited with or without bounds: ``` scala @...
It would work exactly like `each` or `at`. In fact they can be rewritten as `focus(Each)` and `Focus(At(3))` respectively, but I don’t think this is a good idea. The signature...
Yes, the idea is to be able to pass an arbitrary lens to `focus`. Another example is creating a lens that somehow modifies the scheme in a `java.net.URI`, even though...
Speaking of this, I was also wondering if the following feature would be useful: ``` scala // map Person(35).modify(_.age).setToM(List(20, 28)) shouldEqual List(Person(20), Person(28)) // flatMap List(Person(35)).modify(_.each.age).setToM(List(20, 28)) shouldEqual List(Person(20), Person(28))...
Monadic modification is really useful, for example, given a `Monad[Gen]` and a `QuicklensFunctor[Gen]`, one can use that in conjunction with ScalaCheck: ``` scala val genValidPerson: Gen[Person] = Gen.const(Person("John", 30)) val...
Of course this can also be added on top in other ways, e.g. using [monadic workflows](https://github.com/ThoughtWorksInc/each): ``` scala val genValidPerson: Gen[Person] = Gen.const(Person("John", 30)) val genInvalidPersonAge: Gen[Person] = monadic[Gen] {...
IMHO scalaz/cats will add too much weight to this library. The idea was to add `QuicklensMonad` and let the users define their own instances (they can also define a bridge...
This seems fair, although the said functionality might as well be a library. Would you be interested in a PR with that as a separate module (“project” in SBT terms)?
FWIW, in Monocle the things that can extract/modify several values at once (but not get a single value) are called [Traversals](https://github.com/julien-truffaut/Monocle/blob/master/core/shared/src/main/scala/monocle/Traversal.scala).
This might need the same machinery as #4...