内容 2.2 Hierarchical Data and the Closure Property · 128
练习 自检推理
Exercise 2.48: A directed line segment in the
plane can be represented as a pair of vectors—the vector running from the
origin to the start-point of the segment, and the vector running from the
origin to the end-point of the segment. Use your vector representation from
Exercise 2.46 to define a representation for segments with a constructor
make-segment and selectors start-segment and end-segment.
练习 2.48:平面中的有向线段可以表示为一对向量——从原点到线段起点的向量,以及从原点到线段终点的向量。利用练习 2.46 中的向量表示,定义线段的表示,包括构造函数 make-segment 和选择函数 start-segment、end-segment。
我的笔记 自动保存