How to define NamedTuple type with variable number of elements?

To make @fatteneder 's remark perhaps clearer:
NamedTuple parameters are not types! They are actual tuples.
So: NTuple{N,Symbol} where N is a type, and not the needed parameter for the NamedTuple.

1 Like