Nate Goebel. 1981-2013.
My brother departed this world Sunday evening... he was with family, without pain, at peace,
and had no doubt he was headed to a better place.
I sincerely thank everyone who donated to help him
and his family.
July 28, 2010 4:16PM EDT
(define (sum values)
(foldr + 0 values))
(define (best vals-1 vals-2 target)
(if (< (abs (- target (sum vals-1)))
(abs (- target (sum vals-2))))
(define (closest values target)
(cond [(= 1 (length values))
[(= 0 target)
(future (λ () (closest (rest values) target)))]
(future (λ () (closest (rest values) (- target (first values)))))])
(best (touch wout-first) (cons (first values) (touch with-first)) target))]))
Be nice. :-) Use Pastie for good, not evil.