Used macros to reduce code duplication in `codegen/extern_fns` Reviewed-on: M-Labs/nac3#453 Co-authored-by: abdul124 <ar@m-labs.hk> Co-committed-by: abdul124 <ar@m-labs.hk>
We will need to reuse them when implementing elementwise function application for ndarrays.