… in Scheme as
my-vector-subtract
(define (my-vector-subtract vector . vectors) (if (null? vectors) vector (my-vector-add vector (my-vector-additive-inverse (apply my-vector-subtract vectors)))))
in terms of my-vector-add
.
my-vector-additive-inverse
(define (my-vector-additive-inverse vector) (my-vector-scale vector -1))
in terms of my-vector-scale
.