SICP习题 1.4 ( if 语句返回运算符)

(define (a-plus-abs-b a b)
(if (> b 0) (+ a b) (- a b))
)
(define (a-plus-abs-b-book a b)
((if (> b 0) + -) a b)
)
(a-plus-abs-b 1 -1)
(a-plus-abs-b-book 1 -1)

if语句返回运算符,这也太灵活了.

原文地址:https://www.cnblogs.com/R4mble/p/7878520.html