title: How to manipulate named tuples
body: <p>I like the idea of
  <a href="https://docs.julialang.org/en/v1/manual/types/#Named-Tuple-Types-1" rel="noreferrer"><code>NamedTuple</code></a>
  a lot, as a middle ground between <code>Tuple</code> and full, user-defined composite types.</p>
  
  <p>I know how to build a named tuple and access one of its fields</p>
  
  <pre><code>julia&gt; nt = (a=1, b=2.0)
  (a = 1, b = 2.0)
  
  julia&gt; nt.a
  1
  </code></pre>
  
  <p>however, I don't know much more and don't even know whether it is possible to do more than that. I'm thinking about a lot of ways we can manipulate plain tuples (usually involving splatting), and wonder if some of those apply to named tuples as well. For example, how to:</p>
  
  <ul>
  <li>dynamically build a <code>NamedTuple</code> from lists of fields and values</li>
  <li>grow a <code>NamedTuple</code> , i.e add new field-value pairs to it</li>
  <li>"update" (in an immutable sense) a field in an existing named tuple</li>
  </ul>