Typed functors for numerical computations