Advertisement
Guest User

scala1

a guest
Apr 28th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.12 KB | None | 0 0
  1. val fraction = new PartialFunction[Int, Int] {
  2.     def apply(d: Int) = 42 / d
  3.     def isDefinedAt(d: Int) = d != 0
  4. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement