day 3: small tweak
This commit is contained in:
parent
0e03545e94
commit
6ef036e2c5
|
@ -14,7 +14,7 @@ parse :: String -> [[(Char,Int)]]
|
|||
parse = map (map (\x->(head x,read $ tail x))) . map (splitOn ",") . lines
|
||||
|
||||
gensteps :: [(Char,Int)] -> [V2 Int]
|
||||
gensteps = scanl (+) (V2 0 0) . concatMap (\(x,y)->replicate y $ step x)
|
||||
gensteps = scanl1 (+) . concatMap (\(x,y)->replicate y $ step x)
|
||||
|
||||
step :: Char -> V2 Int
|
||||
step x
|
||||
|
|
Loading…
Reference in New Issue
Block a user