Greatest common denominator/divisor function in Forth
Download (right click, save as, rename as appropriate)
1
: gcd 2dup < if swap then begin tuck mod dup 0= until drop ;