Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def construct(that: Point, op: (Int, Int) => Int) =
- Point(op(this.x, that.x), op(this.y, that.y))
- def + (that: Point) : Point = construct(that, _ + _)
- def - (that: Point) : Point = construct(that, _ - _)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement