Fix combinations
This commit is contained in:
parent
8f030af74c
commit
5d158006b1
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ dist :: String -> String -> (Int, String)
|
||||||
dist = dist' 0 S.empty
|
dist = dist' 0 S.empty
|
||||||
|
|
||||||
combinations :: [String] -> [(String, String)]
|
combinations :: [String] -> [(String, String)]
|
||||||
combinations (x:y:xs) = (x, y):(combinations (y:xs))
|
combinations (x:xs) = map (x,) xs ++ combinations xs
|
||||||
combinations [] = []
|
combinations [] = []
|
||||||
|
|
||||||
distances :: [(String, String)] -> String
|
distances :: [(String, String)] -> String
|
||||||
|
|
Loading…
Reference in a new issue