Ethiopian multiplication: Difference between revisions

m (→‎{{header|Perl 6}}: move lambdas inside the function)
Line 1,335:
Total[Select[NestWhileList[{IntegerHalving[#[[1]]],IntegerDoubling[#[[2]]]}&, {x,y}, (#[[1]]>1&)], OddQ[#[[1]]]&]][[2]]
 
Ethiopian[17, 34]</lang>
 
->578</lang>
Output:
-<pre>578</langpre>
 
=={{header|Metafont}}==
Anonymous user