mirror of
https://github.com/mx42/adventofcode.git
synced 2026-01-14 22:09:50 +01:00
WIP 2015 day 9
This commit is contained in:
14
haskellAoC/src/Y2015/Day09.hs
Normal file
14
haskellAoC/src/Y2015/Day09.hs
Normal file
@@ -0,0 +1,14 @@
|
||||
module Y2015.Day09 (y15day09) where
|
||||
|
||||
import Data.List.Split
|
||||
|
||||
parseInput :: String -> (String, String, Int)
|
||||
parseInput input = (city1, city2, dist)
|
||||
where (city1:split1:_) = splitOn " to " input
|
||||
(city2:raw_dist:_) = splitOn " = " split1
|
||||
dist = read $ raw_dist
|
||||
|
||||
y15day09 :: [String] -> (String, String)
|
||||
y15day09 input = (part1, part2)
|
||||
where part1 = show $ map parseInput input
|
||||
part2 = "WIP"
|
||||
@@ -8,6 +8,7 @@ import Y2015.Day05
|
||||
import Y2015.Day06
|
||||
import Y2015.Day07
|
||||
import Y2015.Day08
|
||||
import Y2015.Day09
|
||||
|
||||
year2015 :: String -> [String] -> (String, String)
|
||||
year2015 "01" = y15day01
|
||||
@@ -18,3 +19,4 @@ year2015 "05" = y15day05
|
||||
year2015 "06" = y15day06
|
||||
year2015 "07" = y15day07
|
||||
year2015 "08" = y15day08
|
||||
year2015 "09" = y15day09
|
||||
|
||||
Reference in New Issue
Block a user