Sum of first n cubes: Difference between revisions
m
→{{header|Haskell}}: Tidied
Not a robot (talk | contribs) (Add Cowgol) |
m (→{{header|Haskell}}: Tidied) |
||
Line 855:
Or, in terms of scanl:
<lang haskell>import
import Data.List.Split (chunksOf)
import Text.Printf (printf)
Line 872 ⟶ 871:
main :: IO ()
main =
(putStrLn . table " " . chunksOf 5) $
------------------------- DISPLAY ------------------------
|