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

mac2022-06-30  22

(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

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)