You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since FrankenTuples iterate values in order and g(ft...) is splatting outside of a named context, I think the only thing that can be done is for g(ft...) to be equivalent to g(Tuple(ft)..., NamedTuple(ft)...) (note the lack of an intervening ;) which is currently the case. That is, all values become positional arguments. It would be nice to be able to do what you're suggesting but I don't think it's possible, nor would it be consistent with e.g. g(NamedTuple(ft)...).
ftcall serves this purpose though: ftcall(g, ft) will do what you want. We could introduce a macro that translates g(ft...) to a call to an internal function that will dispatch on whether the thing being splatted is a FrankenTuple and in that case call ftcall, otherwise just do the call as written. I'm not sure how generally useful that would be though. What do you think?
It would be nice to have a concise syntax for splatting args and kwargs.
What should
g(ft...)
do: should it splat the args and kwargs like this?The text was updated successfully, but these errors were encountered: