Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. private val aMap = Map(
  2. "J" -> Journey,
  3. "T" -> Training
  4. )
  5.  
  6. def partialFunction = {
  7. case x if aMap isDefinedAt x => aMap(x)
  8. }
  9.  
  10. val pf: PartialFunction[Int, String] = Map(1 -> "one")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement