use bind import strutils template test_template*() = bind formatFloat echo (1.0/3.0).formatFloat(precision=3) proc test_proc*() = echo (1.0/3.0).formatFloat(precision=3) Run
[https://nim-lang.org/docs/manual.html#generics-bind-statement](https://nim-lang.org/docs/manual.html#generics-bind-statement)