Skip to content

Instantly share code, notes, and snippets.

@larroy
Created March 8, 2016 16:42
Show Gist options
  • Save larroy/0eae498369a24219f02e to your computer and use it in GitHub Desktop.
Save larroy/0eae498369a24219f02e to your computer and use it in GitHub Desktop.
case class A(a: Int, b: Vector[Int], c: Int)
case class B(a: Int, b: Seq[Int], c: Int)
val a = A(...
val b = B(...
val agen = Generic[A]
val bgen = Generic[B]
val newb: B = bgen.from(agen.to(a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment