aboutsummaryrefslogtreecommitdiff
path: root/Puzzle17.hs
diff options
context:
space:
mode:
authorYuchen Pei <me@ypei.me>2017-12-19 20:35:15 +0100
committerYuchen Pei <me@ypei.me>2017-12-19 20:35:15 +0100
commitd7c227e18790ec9b684f07dc5338c2000d2dc18d (patch)
tree0acaffd48e322d9ce597552285d6607824bc72ef /Puzzle17.hs
parent52a4d69a2800070ba9e56d303c284f94fea7ff03 (diff)
minor edits
- added acknowledgement to day 17's solution
Diffstat (limited to 'Puzzle17.hs')
-rw-r--r--Puzzle17.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Puzzle17.hs b/Puzzle17.hs
index 0cdaf54..cb704a1 100644
--- a/Puzzle17.hs
+++ b/Puzzle17.hs
@@ -1,3 +1,5 @@
+-- Acknowledgement: Thanks to Bob Grudem for helping solve part 2 of the puzzle.
+
{-# LANGUAGE BangPatterns #-}
insert :: Int -> Int -> [Int] -> [Int]
@@ -15,7 +17,6 @@ f n m = foldl1 (.) (replicate m (step n)) ([0], 0, 1)
f' :: Int -> Int -> (Int, Int, Int) -> (Int, Int, Int)
f' n 0 acc = acc
---f' n m = step' n (f' n (m - 1))
f' n m !acc = f' n (m - 1) (step' n acc)
solve1 :: Int -> Int