Long multiplication: Difference between revisions
m
→{{header|Python}} (Trans Haskell): Foregrounded main function
(→{{header|Python}} (Trans Haskell): Simplified one expression in terms of reduce, pylinted, added {Works with}) |
m (→{{header|Python}} (Trans Haskell): Foregrounded main function) |
||
Line 4,384:
def
'''
return
polymul(digits(x), digits(y)), 0▼
)▼
def
'''
return
Line 4,405 ⟶ 4,408:
def
'''
return
▲ polymul(digits(x), digits(y)),
def digits(x):
▲ 0
'''Digits of x as a list of integers.'''
▲ )
return [int(c) for c in str(x)]
|