Whitespace --

main
Jacopo De Simoi 11 months ago
parent 6e054406ef
commit cf024a6bc4
  1. 12
      p12/p12.org

@ -99,15 +99,15 @@ We define auxiliary functions to get to the solution
The solution of part 1 is
#+begin_src emacs-lisp
(-reduce #'+ (--map (* (car it) (cdr it))
(-zip-pair (-map #'length regions)
(-map (lambda (region) (-reduce #'+ (-map #'count-fence region))) regions)))) ;part 1
(-reduce #'+ (--map (* (car it) (cdr it))
(-zip-pair (-map #'length regions)
(-map (lambda (region) (-reduce #'+ (-map #'count-fence region))) regions))))
#+end_src
The solution of part 2 is
#+begin_src emacs-lisp
(-reduce #'+ (--map (* (car it) (cdr it))
(-zip-pair (-map #'length regions)
(-map (lambda (region) (-reduce #'+ (-map #'count-vertices region))) regions)))) ;part 2
(-reduce #'+ (--map (* (car it) (cdr it))
(-zip-pair (-map #'length regions)
(-map (lambda (region) (-reduce #'+ (-map #'count-vertices region))) regions))))
#+end_src
#+RESULTS:

Loading…
Cancel
Save