首页 > 其他 > 详细

SCIP习题 1.4

时间:2017-11-22 12:17:01      阅读:225      评论:0      收藏:0      [点我收藏+]

(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语句返回运算符,这也太灵活了.

SCIP习题 1.4

原文:http://www.cnblogs.com/R4mble/p/7878520.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!