remove isLower
This commit is contained in:
parent
c8b7557a06
commit
294bc0e55d
|
|
@ -12,8 +12,6 @@ readPath s = (from,to) where [from,to] = splitOn "-" s
|
||||||
addPath :: Path -> System -> System
|
addPath :: Path -> System -> System
|
||||||
addPath (from,to) = unionWith (++) (Data.Map.fromList [(from,[to]), (to,[from])])
|
addPath (from,to) = unionWith (++) (Data.Map.fromList [(from,[to]), (to,[from])])
|
||||||
|
|
||||||
isLower :: String -> Bool
|
|
||||||
isLower = Data.Char.isLower . head
|
|
||||||
isUpper :: String -> Bool
|
isUpper :: String -> Bool
|
||||||
isUpper = Data.Char.isUpper . head
|
isUpper = Data.Char.isUpper . head
|
||||||
|
|
||||||
|
|
@ -40,4 +38,4 @@ main = do
|
||||||
|
|
||||||
putStrLn "part 2: "
|
putStrLn "part 2: "
|
||||||
let paths = map reverse $ pathFinder2 system ["start"]
|
let paths = map reverse $ pathFinder2 system ["start"]
|
||||||
print $ length paths
|
print $ length paths
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue