【SICP练习】113 练习3.33
2015-09-08 00:00
405 查看
练习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
版权声明:本文为 NoMasp柯于旺 原创文章,未经许可严禁转载!欢迎访问我的博客:http://blog.csdn.net/nomasp
相关文章推荐
- Linux C函数参考手册(PDF版)
- Lua教程(十七):C API简介
- C#实现打造气泡屏幕保护效果
- C/C++数据对齐详细解析
- 利用C语言来求最大连续子序列乘积的方法
- 字符串的组合算法问题的C语言实现攻略
- C 语言基础教程(我的C之旅开始了)[三]
- C++中的extern “C”用法详解
- C 语言基础教程(我的C之旅开始了)[七]
- 最大子矩阵问题实例解析
- C字符串操作函数实现方法小结
- 字典树的基本知识及使用C语言的相关实现
- 详解C语言中free()函数与getpagesize()函数的使用
- C/C++ 宏详细解析
- 使用C语言解决字符串全排列问题
- php中define用法实例
- C/C++实现对STORM运行信息查看及控制的方法
- 用C#生成不重复的随机数的代码
- Locate a File Using a File Open Dialog Box