Quote with a list of kwargs

This, at least, is an improvement over the first version:

function foo2(fname, pnames, pvals)
    params = [Expr(:kw, p, v) for (p, v) in zip(pnames, pvals)]
    quote
        function $fname($(params...))
            return nothing
        end
    end
end

I don’t know how make params nicer though.

1 Like