Spiral matrix: Difference between revisions
m
→{{header|Haskell}}: (tidying - switched if to guards)
m (→{{header|Haskell}}: (tidying - switched if to guards)) |
|||
Line 1,884:
spiral n = go n n 0
where
go rows cols
| otherwise
Line 1,899 ⟶ 1,896:
wikiTable =
join .
("{| class=\"wikitable\" style=\"text-align:
("width:12em;height:12em;table-layout:fixed;\"\n|-\n" :) .
return .
Line 1,906 ⟶ 1,903:
fmap (('|' :) . (' ' :) . intercalate " || " . fmap show)</lang>
{{Out}}
{| class="wikitable" style="text-align:
| 0 || 1 || 2 || 3 || 4
|-
|