Taxicab numbers: Difference between revisions
Content deleted Content added
m →{{header|JavaScript}}: (normalised spacing in existing version) |
|||
Line 1,185: | Line 1,185: | ||
(comparing fst) |
(comparing fst) |
||
[ (fst x + fst y, (x, y)) |
[ (fst x + fst y, (x, y)) |
||
| (x:t) <- tails $ (( |
| (x:t) <- tails $ ((^ 3) >>= (,)) <$> [1 .. nCubes] |
||
, y <- t ] |
, y <- t ] |
||
Line 1,211: | Line 1,211: | ||
concat <$> |
concat <$> |
||
transpose |
transpose |
||
⚫ | |||
((\col -> |
|||
⚫ | |||
in (justifyRight w ' ' <$> col)) <$> |
|||
transpose (taxiRow <$> (take 25 xs ++ take 7 (drop 1999 xs)))) |
transpose (taxiRow <$> (take 25 xs ++ take 7 (drop 1999 xs)))) |
||
where |
where |