Commit 22bed7cf by Stuart Kurtz

Day 21, now with correct comment.

parent b5032e1d
Showing with 2 additions and 2 deletions
......@@ -7,9 +7,9 @@ splits :: [(Int,Integer)]
splits = M.assocs $ roll 3 (M.singleton 0 1) where
roll :: Int -> M.Map Int Integer -> M.Map Int Integer
roll 0 m = m
roll n m = roll (n-1) $ M.unionsWith (+) . map ((`M.mapKeys` m) . (+)) $ [1,2,3]
roll n m = roll (n-1) . M.unionsWith (+) . map ((`M.mapKeys` m) . (+)) $ [1,2,3]
-- universes xPos xScore yPos yScore = (losers,winners)
-- universes xScore xPos yScore yPos = (losers,winners)
-- where player X will make the next move.
universes :: Array (Int,Int,Int,Int) (Integer,Integer)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment