Jump to content

Long multiplication: Difference between revisions

m
(added Ceylon)
Line 1,628:
function toString(Integer[] ints) =>
""
.join(ints.interpose(',', 3).sequence().reversed)
.removeInitial("0")reversed
.removeInitialtrimLeading((char) => char in "0,");
 
function fromInteger(Integer int) => fromString(int.string);
Line 1,666:
value result = multiply(twoToThe64th, twoToThe64th);
 
print("The expected result is ``expectedResult`` and the real result was ``result``");
print("DoThe the match? ``expectedResult ==actual result thenis "Yes!" else "No!"``result``");
print("Do they match? ``expectedResult == result then "Yes!" else "No!"``");
}</lang>
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.