(* Finds the GCD of two integers using Euclid's algorithm. *) (* Based on a program by Chuck Hoffman. *) function remainder(a : integer, b : integer) : integer if a < b then a else remainder