AoC'21, day 6, second problem rvc


After day 256?

 $ cat 06b.rkt  
 #lang racket 
  
  
 (require 
   (prefix-in aoc: "aoc.rkt") 
   (prefix-in aoc6: "06a.rkt") 
   ) 
  
  
 (define (aoc06b . args) 
  
   ; Return the population of the given lanternfish population 
   ; after it's been aged by 256 days.  If no population is given, 
   ; use the contest problem input; otherwise assume the argument 
   ; is the string representation of a problem input. 
  
   (aoc6:lanternfish-population-growth 256 
     (apply aoc:read-comma-separated-numbers (cons 6 args)))) 
  
  
 (module+ main 
   (aoc06b) 
   ) 
  
  
 (module+ test 
  
   (require rackunit) 
  
   (check-equal? (aoc06b aoc6:example-data) 26984457539) 
   (check-equal? (aoc06b) 1708791884591) 
   ) 
  
 $ raco test 06b.rkt  
 raco test: (submod "06b.rkt" test) 
 2 tests passed 
  
 $