Confused about NamedTuple implementation

This shows us that a NamedTuple is a built-in type that has one or more names
[ hence NamedTuple ] and becomes constructed when given a tuple of value[s]
[ hence NamedTuple] to be assigned to the name[s].

to_obtain = (three = 3,)

name_to_use = :three
value_to_assign = 3

# we start with the Type, 
#   which is specialized by the name[s]
# we finish with the value

NamedTuple_type =
    Core.apply_type(Core.NamedTuple, (name_to_use,))

namedtuple = 
    NamedTuple_type( Core.tuple(value_to_assign) )

namedtuple == (three = 3,)
1 Like