5 (defn make-segment [x y]
8 (defn start-segment [seg]
11 (defn end-segment [seg]
14 (defn make-point [x y]
23 (defn midpoint-segment [seg]
24 (let [x1 (x-point (start-segment seg))
25 y1 (y-point (start-segment seg))
26 x2 (x-point (end-segment seg))
27 y2 (y-point (end-segment seg))]
28 (make-point (average x1 x2)
32 (deftest test-mid-point-1-1-3-3
33 (let [m (midpoint-segment (make-segment (make-point 1 1)
35 (are [x y] [approx-equal x y]