Ethiopian multiplication: Difference between revisions

m
→‎{{header|Ruby}}: Use end-less defs
m (→‎{{header|Ruby}}: Use end-less defs)
Line 5,217:
Iterative and recursive implementations here.
I've chosen to highlight the example 20*5 which I think is more illustrative.
<syntaxhighlight lang="ruby">def halve(x) = x/2 end
def double(x) = x*2 end
 
# iterative
1,149

edits