This blog contains code snippets from Berlin Research.
class R(n: Int, d: Int) { val (x, y) = { val g = myfunc (n/g, d/g) }}class R private (val x: Int, val y: Int);object R { def apply(n: Int, d: Int): R = { val g = myfunc; new R(n / g, d / g); }}
No comments:
Post a Comment