Created
April 28, 2021 14:57
-
-
Save deanwampler/75d86affa6f9d8ba83f3b5f3f06936ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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