From 03ad9b7eadb02b05e4eb5074d0fdaadf8dc4ee00 Mon Sep 17 00:00:00 2001 From: bd Date: Wed, 26 Jun 2024 18:43:31 -0600 Subject: AoC 2023.2 p1+2 --- the-ideal-stocking-stuffer/tiss.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'the-ideal-stocking-stuffer/tiss.scm') diff --git a/the-ideal-stocking-stuffer/tiss.scm b/the-ideal-stocking-stuffer/tiss.scm index 5162b40..eeac931 100644 --- a/the-ideal-stocking-stuffer/tiss.scm +++ b/the-ideal-stocking-stuffer/tiss.scm @@ -9,14 +9,13 @@ (define (tiss prefix output-prefix suffix) - "Given KEY puzzle key and the desired + "Given KEY puzzle key, the desired OUTPUT-PREFIX, and the current suffix, incrementally tries hash inputs until the desired output is achieved. -Throws an exception after 150000 iterations." - ;; (display (format #f "suffix is now: ~s\n" suffix)) - (when (> suffix 1000000000) +Throws an exception after 10000000 iterations." + (when (> suffix 10000000) (raise-exception (make-exception-with-message (format #f "Exceeded maximum attempts for key ~s!" prefix)))) -- cgit v1.2.3