If you want to use an array as a return type, instead of a seq "len(t)" should be a static[int] (so known at compile-time).
You can check andrea's linalg library on various static[int] examples in a matrix/vector context: [https://github.com/unicredit/linear-algebra](https://github.com/unicredit/linear-algebra)