the examples in the docs does no convenience me, why not use a template?
instead of
template optMul{`*`(a, 2)}(a: int): int = a+a
Run
just write:
template `*`(a: int, b: static[2]): int = a+a
Run
