removed debug code
This commit is contained in:
parent
87f0c0d9d1
commit
6b14d29c79
4
Day2.hs
4
Day2.hs
|
@ -9,7 +9,7 @@ import Data.Text (splitOn, Text, unpack, pack)
|
||||||
data Submarine = Submarine {
|
data Submarine = Submarine {
|
||||||
horizontal :: Int
|
horizontal :: Int
|
||||||
, depth :: Int
|
, depth :: Int
|
||||||
} deriving Show
|
}
|
||||||
|
|
||||||
type Movement = (String, Int)
|
type Movement = (String, Int)
|
||||||
|
|
||||||
|
@ -40,4 +40,4 @@ main = do
|
||||||
|
|
||||||
print $ horizontal sub * depth sub
|
print $ horizontal sub * depth sub
|
||||||
|
|
||||||
hClose input
|
hClose input
|
||||||
|
|
|
@ -5,14 +5,12 @@ module Day2_1 where
|
||||||
import System.IO (openFile, IOMode (ReadMode), hClose, hGetContents)
|
import System.IO (openFile, IOMode (ReadMode), hClose, hGetContents)
|
||||||
import Data.Text (splitOn, Text, unpack, pack)
|
import Data.Text (splitOn, Text, unpack, pack)
|
||||||
import Data.List (mapAccumL)
|
import Data.List (mapAccumL)
|
||||||
import Prelude hiding ((++))
|
|
||||||
|
|
||||||
|
|
||||||
data Submarine = Submarine {
|
data Submarine = Submarine {
|
||||||
horizontal :: Int
|
horizontal :: Int
|
||||||
, depth :: Int
|
, depth :: Int
|
||||||
, aim :: Int
|
, aim :: Int
|
||||||
} deriving Show
|
}
|
||||||
|
|
||||||
type Movement = (String, Int)
|
type Movement = (String, Int)
|
||||||
|
|
||||||
|
@ -40,4 +38,4 @@ main = do
|
||||||
|
|
||||||
print $ horizontal sub * depth sub
|
print $ horizontal sub * depth sub
|
||||||
|
|
||||||
hClose input
|
hClose input
|
||||||
|
|
Loading…
Reference in New Issue