Fibonacci n-step number sequences: Difference between revisions

Content added Content deleted
(→‎Python: generic anamorphism: Reframed and generalised the curried Python example)
Line 3,579: Line 3,579:
# spacedTable :: [[String]] -> String
# spacedTable :: [[String]] -> String
def spacedTable(rows):
def spacedTable(rows):
columnWidths = list(map(
columnWidths = [
lambda col: max([len(x) for x in col]),
max([len(x) for x in col])
zip(*rows)
for col in zip(*rows)
))
]
return '\n'.join([
return '\n'.join([
' '.join(
' '.join(