sicp-lang/sicp

Contract for vector-scale should be real?

sorawee opened this issue · 0 comments

The invariant for vect is that the coords should be reals. However, vector-scale can break this invariant. E.g.,

(vector-scale (sqrt -1) (vect 1 2))

results in

(vect 0+1i 0+2i)