Guest User

Untitled

a guest
Aug 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. How to mix apparently incompatible paradigms: OOP and FP? [closed]
  2. // begin cheesy example
  3. case class Circle(center: (Double, Double), radius: Double) {
  4. def move(c: (Double, Double)) = copy(center = c)
  5. def resize(r: Double) = copy(radius = r)
  6. def area = math.Pi * radius * radius
  7. }
Add Comment
Please, Sign In to add comment