Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save deanwampler/75d86affa6f9d8ba83f3b5f3f06936ba to your computer and use it in GitHub Desktop.
Save deanwampler/75d86affa6f9d8ba83f3b5f3f06936ba to your computer and use it in GitHub Desktop.
def examine1[T](seq: Seq[T]): Seq[String] = seq map {
case i: Int => s"Int: $i"
case other => s"Other: $other"
}
def examine2[T <: Matchable](seq: Seq[T]): Seq[String] = seq map {
case i: Int => s"Int: $i"
case other => s"Other: $other"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment