From f3e457db6fbefe3acc95c97e04d1a972ebc5f123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 9 Apr 2013 23:08:48 +0200 Subject: Scala : simplify use of operators --- Scala/sandbox/3-rationals.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scala/sandbox/3-rationals.scala b/Scala/sandbox/3-rationals.scala index 868f216..8cdf4d7 100644 --- a/Scala/sandbox/3-rationals.scala +++ b/Scala/sandbox/3-rationals.scala @@ -33,9 +33,9 @@ object Rationals { def run = { println("Rationals") - println(new Rational(2, 3).add(new Rational(3, 4)).toString) - println(new Rational(1, 3).sub(new Rational(5 ,7)).sub(new Rational(3, 2)).toString) - println(new Rational(1, 3).max(new Rational(5 ,7)).toString) + println(new Rational(2, 3) add (new Rational(3, 4)) toString) + println(new Rational(1, 3) sub (new Rational(5 ,7)) sub (new Rational(3, 2)) toString) + println(new Rational(1, 3) max (new Rational(5 ,7)) toString) } } -- cgit v1.1-2-g2b99