# Compute the greatest common divisor # of x and y by Euclid's algorithm. # Assume 0 <= x <= y. let rec gcd x y = if (equal x 0) y #else (gcd (mod y x) x) in gcd 54 129