scalaz/scalaz — pull request #646 by puffnfresh (2014-02-15 02:09:39+00:00)
Title: Add %~ method to Iso

Allows transforming an arrow under an isomorphism. For example:

case class MyInt(a: Int)
val myIntIso = new (MyInt <=> Int) {
val from = MyInt;
val to = (_: MyInt).a
}
val m = MyInt(1) |> myIntIso %~ (_ + 1)
// m: MyInt = MyInt(2)

The %~ method name is taken from a much more general function from the
Haskell lens library. This could be a bad idea.

Set isomorphisms use scalaz.Compose but {,Bi}Functor isomorphisms
require scalaz.{,Bi}NaturalTransformation, respectively. There might
be a generalisation missing.