main
Inga 🏳‍🌈 1 year ago
parent d742bc5e7f
commit b245076e88
  1. 11
      day01-easy/main.scm

@ -23,13 +23,7 @@
(reduce (cdr list) reducer (reducer current (car list)))))
(define (combine a b combiner)
(if
(null? a)
b
(if
(null? b)
a
(combiner a b))))
(if (null? a) b (if (null? b) a (combiner a b))))
(define (sum numbers) (reduce numbers + 0))
@ -50,8 +44,7 @@
(combine
current
accumulator
(lambda (current rest)
(cons (car current) (cdr rest)))))
(lambda (current rest) (cons (car current) (cdr rest)))))
'()))
(define (solve-line line)

Loading…
Cancel
Save