diff options
-rw-r--r-- | Puzzle17.hs | 3 |
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 |