roadStep :: (Path, Path) -> Section -> (Path, Path)
roadStep (pathA, pathB) (Section a b c) =
    let priceA = sum $ map snd pathA
        priceB = sum $ map snd pathB
        forwardPriceToA = priceA + a
        crossPriceToA = priceB + b + c
        forwardPriceToB = priceB + b
        crossPriceToB = priceA + a + c
        newPathToA = if forwardPriceToA <= crossPriceToA
                        then (A, a) : pathA
                        else (C, c) : (B, b) : pathB
        newPathToB = if forwardPriceToB <= crossPriceToB
                        then (B, b) : pathB
                        else (C, c) : (A, a) : pathA
    in  (newPathToA, newPathToB)
roadStep :: (Path, Path) -> Section -> (Path, Path)
roadStep (pathA, pathB) (Section a b c) =
    let priceA = sum $ map snd pathA
        priceB = sum $ map snd pathB
        forwardPriceToA = priceA + a
        crossPriceToA = priceB + b + c
        forwardPriceToB = priceB + b
        crossPriceToB = priceA + a + c
        newPathToA = if forwardPriceToA <= crossPriceToA
                        then (A, a) : pathA
                        else (C, c) : (B, b) : pathB
        newPathToB = if forwardPriceToB <= crossPriceToB
                        then (B, b) : pathB
                        else (C, c) : (A, a) : pathA
    in  (newPathToA, newPathToB)
roadStep (pathA, pathB) (Section a b c) =
    let priceA = sum $ map snd pathA
        priceB = sum $ map snd pathB
        forwardPriceToA = priceA + a
        crossPriceToA = priceB + b + c
        forwardPriceToB = priceB + b
        crossPriceToB = priceA + a + c
        newPathToA = if forwardPriceToA <= crossPriceToA
                        then (A, a) : pathA
                        else (C, c) : (B, b) : pathB
        newPathToB = if forwardPriceToB <= crossPriceToB
                        then (B, b) : pathB
                        else (C, c) : (A, a) : pathA
    in  (newPathToA, newPathToB)