Skip to content

Instantly share code, notes, and snippets.

@dabd
Created March 22, 2016 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dabd/477f585076cdcdf4c413 to your computer and use it in GitHub Desktop.
Save dabd/477f585076cdcdf4c413 to your computer and use it in GitHub Desktop.
sealed trait A
case class B() extends A
case class C() extends A
val xs = List(B(), B(), C())
xs.groupBy(_.getClass)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment