function norm (v) {
    return abs(sqrt(dot(v, v)))
  }
Calculate the norm of a vector.
We can't use math.norm because factory can't handle circular dependency.
Seriously, I'm really fed up with factory.