Multiplication tables: Difference between revisions
Content added Content deleted
m (→Functional Python: Minor reformat to ease the comparison of list comprehension with list monad) |
(→Functional Python: Tidying layout for legibility) |
||
Line 4,180: | Line 4,180: | ||
xs = enumFromTo(1)(n) |
xs = enumFromTo(1)(n) |
||
return unlines( |
return unlines( |
||
bind(xs)(lambda y: [ |
|||
pad(str(y) + ':') + unwords( |
|||
bind(xs)(lambda x: [ |
|||
pad(str(x * y) if x >= y else '') |
|||
]) |
|||
) |
|||
]) |
|||
) |
|||