In Operators§

See primary documentation in context for infix gcd.

multi infix:<gcd>($a, $b --> Int:D)

Coerces both arguments to Int and returns the greatest common divisor. If one of its arguments is 0, the other is returned (when both arguments are 0, the operator returns 0).