title: What does this line of erlang code do?
body: <p>Could someone explain to me what this line of erlang code does?</p>
  
  <pre><code>[ReportBody|_] = [Body || {&lt;&lt;"val1"&gt;&gt;,&lt;&lt;"val2"&gt;&gt;,_,_,Body} &lt;- Parts].
  </code></pre>
  
  <p>You can assume the Parts variable to contain the following:</p>
  
  <pre><code>[{&lt;&lt;"val1"&gt;&gt;,&lt;&lt;"val2"&gt;&gt;,
           [{&lt;&lt;"val3"&gt;&gt;,
             &lt;&lt;"val4"&gt;&gt;},
            {&lt;&lt;"val5"&gt;&gt;,&lt;&lt;"val6"&gt;&gt;},
            {&lt;&lt;"val7"&gt;&gt;,&lt;&lt;"val8"&gt;&gt;}],
           [{&lt;&lt;"val9"&gt;&gt;,
             [{&lt;&lt;"val10"&gt;&gt;,&lt;&lt;"val11"&gt;&gt;},{&lt;&lt;"val12"&gt;&gt;,&lt;&lt;"val13"&gt;&gt;}]},
            {&lt;&lt;"val14"&gt;&gt;,&lt;&lt;"val15"&gt;&gt;},
            {&lt;&lt;"val16"&gt;&gt;,[]}],
           &lt;&lt;"val17"&gt;&gt;}]
  </code></pre>
  
  <p>I assume the point of the line of code is to validate if 'val1' and 'val2' exist in 'Parts' and return 'Body'</p>
  
  <p>but is my assumption correct and I would like a detailed explanation of how that line of code works. I am an erlang noob so be gentle.</p>