What’s wrong with this function?
(define (get-two-largest a b c)
(cond ((and (>= a b) (>= a c)) (if (> b c) (list a b) (list a c))))
(cond ((and (>= b a) (>= b c)) (if (> a c) (list b a) (list b c))))
(cond ((and (>= c a) (>= c b)) (if (> a b) (list c a) (list c b))))
It doesn’t return anything when i pass the arguments 3 5 4, in that order.
Why use
condif you only put one branch inside it?