Fix combinations
This commit is contained in:
parent
8f030af74c
commit
5d158006b1
|
@ -14,7 +14,7 @@ dist :: String -> String -> (Int, String)
|
|||
dist = dist' 0 S.empty
|
||||
|
||||
combinations :: [String] -> [(String, String)]
|
||||
combinations (x:y:xs) = (x, y):(combinations (y:xs))
|
||||
combinations (x:xs) = map (x,) xs ++ combinations xs
|
||||
combinations [] = []
|
||||
|
||||
distances :: [(String, String)] -> String
|
||||
|
|
Loading…
Reference in New Issue