I want to create an array of named tuples of type T, where one field of the tuple, named ‘bak’, is recursive. Or, in other words, it can be either ‘nothing’ or of type T. How do I do this?
tmp=[(bak=nothing)]
push!(tmp,(bak=(bak=nothing,),))
ERROR: MethodError: Cannot `convert` an object of type NamedTuple{(:bak,),Tuple{Nothing}} to an object of type Nothing