【SICP练习】113 练习3.33
来源:互联网 发布:apache动静态资源分离 编辑:程序博客网 时间:2024/04/29 03:43
练习3-33
原文
Exercise 3.33. Using primitive multiplier, adder, and constant constraints, define a procedure averager that takes three connectors a, b, and c as inputs and establishes the constraint that the value of c is the average of the values of a and b.
代码
(define (averager a b c) (let ((sum (make-connector)) (d (make-connector))) (adder a b sum) (multiplier sum d c) (constant (/ 1 2) d) 'ok))
感谢访问,希望对您有所帮助。 欢迎关注或收藏、评论或点赞。
为使本文得到斧正和提问,转载请注明出处:
http://blog.csdn.net/nomasp
5 0
- 【SICP练习】113 练习3.33
- 【SICP练习】2 练习1.6
- 【SICP练习】3 练习1.7
- 【SICP练习】4 练习1.8
- 【SICP练习】5 练习1.9
- 【SICP练习】6 练习1.10
- 【SICP练习】7 练习1.11
- 【SICP练习】8 练习1.12
- 【SICP练习】9 练习1.15
- 【SICP练习】10 练习1.16
- 【SICP练习】11 练习1.17
- 【SICP练习】12 练习1.18
- 【SICP练习】13 练习1.19
- 【SICP练习】14 练习1.20
- 【SICP练习】15 练习1.21
- 【SICP练习】16 练习1.22
- 【SICP练习】17 练习1.23
- 【SICP练习】18 练习1.24
- 【LeetCode】014.Longest Common Prefix
- Android Handler使用详解
- 【SICP练习】112 练习3.28
- poj2299(树状数组)
- java中的反射机制
- 【SICP练习】113 练习3.33
- Ubuntu Firefox浏览器安装 adobe flash plugin [包括skype等一些商业软件]
- Oracle存储过程中使用游标来批量解析CLOB字段里面的xml字符串:
- 赤峰采摘园
- iOS笔记2
- Excel Sheet Column Title
- python语言的动态性4
- Zend Studio配置SVN版本控制开发环境—文件在不锁的时候就不能编辑
- Reverse Integer 整数逆转