Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to mix apparently incompatible paradigms: OOP and FP? [closed]
- // begin cheesy example
- case class Circle(center: (Double, Double), radius: Double) {
- def move(c: (Double, Double)) = copy(center = c)
- def resize(r: Double) = copy(radius = r)
- def area = math.Pi * radius * radius
- }
Add Comment
Please, Sign In to add comment