Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private val aMap = Map(
- "J" -> Journey,
- "T" -> Training
- )
- def partialFunction = {
- case x if aMap isDefinedAt x => aMap(x)
- }
- val pf: PartialFunction[Int, String] = Map(1 -> "one")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement