X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=advent01.hs;h=a8969448c1a21cb70caf499f3d612b54ce660061;hb=95bbeb70148b9f7578ec4e00f1efda43a5a24a9d;hp=27a6f21db1c5351d75e3b1ce72ba5656e206cc56;hpb=98fb1acf36bb318266a95284760866faff505765;p=advent-of-code-16.git diff --git a/advent01.hs b/advent01.hs index 27a6f21..a896944 100644 --- a/advent01.hs +++ b/advent01.hs @@ -1,3 +1,5 @@ +module Main(main) where + import Data.List (sort) import Data.List.Split (splitOn) @@ -52,7 +54,8 @@ expandSteps = -- Execute a series of steps, keeping track of the positions after each step takeSteps :: Position -> [Step] -> [Position] -takeSteps pos steps = scanl move pos steps +-- takeSteps pos steps = scanl move pos steps +takeSteps = scanl move -- Make one move, by updating direction then position move :: Position -> Step -> Position