expression | result |
---|---|
(every - '(3 -5 -8 13)) | |
(keep (lambda (x) (< x 10)) '(1 12 3 14 5 16)) | |
(define (foo x y) (+ (last x) (last y))) (accumulate foo '(321 432 543)) | |
(count (keep even? '(11 12 13 14 15))) | |
(+ 10 ((if (equal? 'a 'b) + *) 2 3)) |
For example (sum-big-ones '(1 20 5 30)) evaluates to 20+30=50.
(define (foo sen) (accumulate (lambda (x y) (if (> (count x) (count y)) x y)) sen))