In learning Factor, I implemented the following pseudocode in Factor. Psuedocode function gcd(a, b) if a = 0 return b while b ≠ 0 if a > b a := a − b else b := b − a return a Factor : meither? ( x y quot? -- x y ? ) 2over [ either? ] 2dip rot ; : gcd-by-subtraction ( x y -- z ) [ [ zero? ] meither? ] [ 2dup > [ dup [ - ] dip ] [ over - ] if ] until drop ;