diff options
author | J.J <thechairman@thechairman.info> | 2023-11-30 17:10:00 -0500 |
---|---|---|
committer | J.J <thechairman@thechairman.info> | 2023-11-30 17:10:00 -0500 |
commit | 8ab65dc2da1742eb86ec636c50c7018385b68167 (patch) | |
tree | c4fd556aca9b867cfa1f2f174128c30857353884 /2022/day-06/day-06.rkt | |
parent | fafbeaf9e3c09ba7a5bea7e47d5736001f8a5aa1 (diff) | |
download | gleam_aoc-8ab65dc2da1742eb86ec636c50c7018385b68167.tar.gz gleam_aoc-8ab65dc2da1742eb86ec636c50c7018385b68167.zip |
prep for 2023, renaming for consistency
Diffstat (limited to '2022/day-06/day-06.rkt')
-rw-r--r-- | 2022/day-06/day-06.rkt | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/2022/day-06/day-06.rkt b/2022/day-06/day-06.rkt deleted file mode 100644 index 1c167a6..0000000 --- a/2022/day-06/day-06.rkt +++ /dev/null @@ -1,22 +0,0 @@ -#lang racket - -(require advent-of-code - (only-in algorithms sliding)) - -(define buffer (fetch-aoc-input (find-session) 2022 6)) - -(define (find-marker data type) - (define n - (case type - [(start-of-packet) 4] - [(start-of-message) 14])) - (for/first ([chunk (in-list (sliding (string->list data) n))] - [i (in-naturals n)] - #:unless (check-duplicates chunk)) - i)) - -;; part 1 -(find-marker buffer 'start-of-packet) - -;; part 2 -(find-marker buffer 'start-of-message) |