From b73b988213d7cb1a60916ee87d915ef7b744acd5 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Fri, 1 Jan 2016 23:00:13 -0800 Subject: [PATCH] typo --- day10.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/day10.scrbl b/day10.scrbl index 902fad4..f0d1cf8 100644 --- a/day10.scrbl +++ b/day10.scrbl @@ -15,7 +15,7 @@ The puzzle asks us to compute the @italic{look and say} sequence invented by mathematician John Conway. Each iteration of the sequence is the description of the last step if you said it in numbers. So @racket[1] becomes ``one 1'', written @racket[11]; @racket[11] becomes ``two ones'', or @racket[21], then @racket[1211], @racket[111221], and so on. -As in @secref{Day_1}, this puzzle relies on cumulative state, so we'll loop using @racket[for/fold]. To generate the new string for each pass of the loop, we'll use @racket[regexp-match*] to find every contiguous run of digits. Each digit run will be converted into a list with the number of digits and then digit. Then all these lists of numbers are concatenated into a new string, and the process repeats. +As in @secref{Day_1}, this puzzle relies on cumulative state, so we'll loop using @racket[for/fold]. To generate the new string for each pass of the loop, we'll use @racket[regexp-match*] to find every contiguous run of digits. Each digit run will be converted into a list with the number of digits and the digit. Then all these lists are concatenated into a new string, and the process repeats. The second part of the puzzle is just going to change the number of iterations. So we'll make one function that we can use for both parts.