Solve the no connection puzzle: Difference between revisions
Content added Content deleted
m (→{{header|Haskell}}: Tidying, and pruned out one import.) |
|||
Line 1,580: | Line 1,580: | ||
=={{header|Haskell}}== |
=={{header|Haskell}}== |
||
<lang haskell>import Data.List ( |
<lang haskell>import Data.List (permutations) |
||
solution :: [Int] |
solution :: [Int] |
||
Line 1,596: | Line 1,596: | ||
main = |
main = |
||
(putStrLn . unlines) $ |
(putStrLn . unlines) $ |
||
unlines (zipWith (\x y -> x : (" = " ++ show y)) ['A' .. 'H'] solution) : |
|||
⚫ | |||
⚫ | |||
| length s > 3 = s |
|||
where |
|||
| otherwise = " " ++ s |
|||
⚫ | |||
in intercalate |
|||
| length s > 3 = s |
|||
| otherwise = " " ++ s</lang> |
|||
⚫ | |||
{{Out}} |
{{Out}} |
||
<pre style="font-size:80%">A = 3 |
<pre style="font-size:80%">A = 3 |