You are viewing a single comment's thread. Return to all comments →
5 lines of code in SCALA
def gcd(x: Int, y: Int): Int ={ val remainder = x%y remainder match { case 0 => y case _ => gcd(y, remainder) }
Computing the GCD
You are viewing a single comment's thread. Return to all comments →
5 lines of code in SCALA