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
I think it would be nice to have a merge method (for NamedTuples) that took a function op as a first argument and the combined values using f to form the resulting NamedTuple.
For example, it could be implemented like this:
merge(op, nt::NamedTuple{K,V}...) where {K,V} =NamedTuple{K}(op.(values.(nt)...))
The text was updated successfully, but these errors were encountered:
I think it would be nice to have a
merge
method (for NamedTuples) that took a functionop
as a first argument and the combined values usingf
to form the resulting NamedTuple.For example, it could be implemented like this:
The text was updated successfully, but these errors were encountered: