Suppose that I have several functions where one calling another. The example below is arbitrary but in reality
bar need different keyword arguments. From a caller perspective, I can specify any keyword arguments and all of them flow through the chain.
foo1(x; kwargs...) = foo2(x; kwargs...) foo2(x; kwargs...) = foo3(x; kwargs...) foo3(x; kwargs...) = bar(x; kwargs...)
The problem is, the
bar function (not owned by me) can only deal with its own recognized keyword arguments. Hence, it breaks when it sees additional ones that were only meant for
How do I fix this? I can write a function that extracts what I need in
foo3 and reconstruct
kwargs along the way. Is there a better way?