Middle three digits: Difference between revisions
m
→{{header|Python}}: (simplified an expression – max num string length)
m (→{{header|Python}}: (simplified an expression – max num string length)) |
|||
Line 4,033:
-100, 100, -12345, 1, 2, -1, -10, 2002, -2002, 0
]
mx =
print (
'\n'.join([
Line 4,048 ⟶ 4,046:
# GENERIC -------------------------------------------------
Line 4,072 ⟶ 4,075:
def Left(x):
return {'type': 'Either', 'Right': None, 'Left': x}
▲# maximumBy :: (a -> a -> a) -> [a] -> a
▲def maximumBy(f):
▲ return lambda xs: reduce(go, xs[1:], xs[0])
|