diff --git a/day01-easy/main.scm b/day01-easy/main.scm index 24b473c..b27da6b 100755 --- a/day01-easy/main.scm +++ b/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)