Greatest common divisor: Difference between revisions

m
→‎{{header|Raku}}: add an alternative
m (→‎{{header|Wren}}: Changed to Wren S/H)
m (→‎{{header|Raku}}: add an alternative)
Line 5,510:
multi gcd (Int $a, 0) { abs $a }
multi gcd (Int $a, Int $b) { gcd $b, $a % $b }</syntaxhighlight>
 
===Recursive(inline coderef)===
<syntaxhighlight lang="raku" line>{ $^b ?? &?BLOCK( $^b, $^a % $^b ) !! $^a }</syntaxhighlight>
 
===Concise===
350

edits