@ Pohon BBS
SICP : Let's Read! (18 replies)

■ 🕑 17. epic phail
   Fixed the fix
   
   #lang sicp
   
   (define (square x) (* x x))
   
   (define (sicp_ex_1.3 x y z)
    (+
    (if (= x y z) 0
    (if (< x y) (if (< x z) 0 (square x)) (square x))))
    (if (< y x) (if (< y z) 0 (square y)) (square y))
    (if (< z y) (if (< z x) 0 (square z)) (square z)))
   
   (sicp_ex_1.3 1 2 3)
   (sicp_ex_1.3 2 2 2)
   (sicp_ex_1.3 2 1 0)
    

Pohon BBS