improved comments

main
Inga 🏳‍🌈 10 months ago
parent 2bd8d0f87d
commit 4729fdbe40
  1. 7
      day05-hard/main.scm

@ -224,7 +224,7 @@
#f #f
(min-list '())) (min-list '()))
;=============== repeat ====================== ;=============== remove-adjacent-duplicates ======================
(define remove-adjacent-duplicates (define remove-adjacent-duplicates
(reduce-right '() (reduce-right '()
(lambda (current accumulator) (lambda (current accumulator)
@ -274,7 +274,7 @@
((split (is 0)) ((split (is 0))
'(0 1 2 0 0 3 4 5 0 6 7 0))) '(0 1 2 0 0 3 4 5 0 6 7 0)))
;=============== split ====================== ;=============== chunks ======================
(define (chunks chunk-size) (define (chunks chunk-size)
(compose (list (compose (list
cdr cdr
@ -374,7 +374,7 @@
(list symbol-in-both-ranges 20 30)) (list symbol-in-both-ranges 20 30))
(get-range-intersections 20 30 20 30)) (get-range-intersections 20 30 20 30))
;=============== solution ====================== ;=============== solution data definitions ======================
(define symbol-current (quote current)) (define symbol-current (quote current))
(define symbol-previous (quote previous)) (define symbol-previous (quote previous))
@ -408,6 +408,7 @@
(define (get-map-source-end seed-map) (value-by-index seed-map 1)) (define (get-map-source-end seed-map) (value-by-index seed-map 1))
(define (get-map-destination-start seed-map) (value-by-index seed-map 2)) (define (get-map-destination-start seed-map) (value-by-index seed-map 2))
;=============== solution ======================
(define (apply-map-to-range map-source-start map-source-end map-destination-start range-start range-end) (define (apply-map-to-range map-source-start map-source-end map-destination-start range-start range-end)
((compose (list ((compose (list
(map (lambda (intersection) (map (lambda (intersection)

Loading…
Cancel
Save