a (slow) implementation for double arrays
remove map-double-array macro; hand-written expansions without reflection
HasEuclideanNorm protocol with dist function