more simplification

main
Inga 🏳‍🌈 12 months ago
parent 46167adb2c
commit e91d37e8bc
  1. 6
      day01-easy/main.scm

@ -22,9 +22,9 @@
(lambda (current accumulator) (cons (mapper current) accumulator)) (lambda (current accumulator) (cons (mapper current) accumulator))
'())) '()))
(define compose (reduce-right (define (compose-two f g) (lambda (x) (f (g x))))
(lambda (current accumulator) (lambda (value) (current (accumulator value))))
id)) (define compose (reduce-right compose-two id))
(define (combine combiner) (define (combine combiner)
(lambda (a b) (if (null? a) b (if (null? b) a (combiner a b))))) (lambda (a b) (if (null? a) b (if (null? b) a (combiner a b)))))

Loading…
Cancel
Save