灯下 登录
计算机科学 / SICP / 3.3.5 Propagation of Constraints

Exercise 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.

练习 3.33:利用基本的乘法器、加法器和常量约束,定义一个过程 averager,它以三个连接器 a、b 和 c 为输入,并建立约束:c 的值等于 a 和 b 的值的平均数。