Floyd's triangle: Difference between revisions
m
→{{header|Python}}: (Slight simplification of the type)
(→{{header|Haskell}}: Alternatively, defining just the relationship between successive terms:) |
m (→{{header|Python}}: (Slight simplification of the type)) |
||
Line 3,546:
# floyd ::
def floyd(xs):
n = succ(len(xs))
return
enumFromTo(succ(n * pred(n) // 2))(
n * succ(n) // 2
)
# floydN :: Int -> [[Int]]
def floydN(n):
return take
|