<div dir="ltr">I'm sure I'm missing something obvious, but here goes:<div><br></div><div>What is going on here? Is L4 a list? If so, why can't I reverse it?</div><div><br></div><div>
<p class=""><font face="courier new, monospace">70> L4. </font></p>
<p class=""><font face="courier new, monospace">[[<<"8">>,<<"7">>,<<"6">>,<<"5">>],</font></p>
<p class=""><font face="courier new, monospace"> [<<"4">>,<<"3">>,<<"2">>,<<"1">>]|</font></p>
<p class=""><font face="courier new, monospace"> 0]</font></p>
<p class=""><font face="courier new, monospace">71> lists:reverse(L4).</font></p>
<p class=""><font face="courier new, monospace">** exception error: bad argument</font></p>
<p class=""><font face="courier new, monospace"> in function lists:reverse/2</font></p>
<p class=""><font face="courier new, monospace"> called as lists:reverse(0,</font></p>
<p class=""><font face="courier new, monospace"> [[<<"4">>,<<"3">>,<<"2">>,<<"1">>],</font></p>
<p class=""><font face="courier new, monospace"> [<<"8">>,<<"7">>,<<"6">>,<<"5">>]])</font></p>
<p class=""><font face="courier new, monospace"> in call from lists:reverse/1 (lists.erl, line 152)</font></p>
<p class=""><font face="courier new, monospace">72> [Head1|Rest1] = L4.</font></p>
<p class=""><font face="courier new, monospace">[[<<"8">>,<<"7">>,<<"6">>,<<"5">>],</font></p>
<p class=""><font face="courier new, monospace"> [<<"4">>,<<"3">>,<<"2">>,<<"1">>]|</font></p>
<p class=""><font face="courier new, monospace"> 0]</font></p>
<p class=""><font face="courier new, monospace">73> Rest1.</font></p>
<p class=""><font face="courier new, monospace">[[<<"4">>,<<"3">>,<<"2">>,<<"1">>]|0]</font></p>
<p class=""><font face="courier new, monospace">74> lists:reverse(Rest1).</font></p>
<p class=""><font face="courier new, monospace">** exception error: no function clause matching lists:reverse([[<<"4">>,<<"3">>,<<"2">>,<<"1">>]|0]) (lists.erl, line 145)</font></p>
<p class=""><font face="courier new, monospace">75> [Head2|Rest2] = Rest1.</font></p>
<p class=""><font face="courier new, monospace">[[<<"4">>,<<"3">>,<<"2">>,<<"1">>]|0]</font></p>
<p class=""><font face="courier new, monospace">76> Head2.</font></p>
<p class=""><font face="courier new, monospace">[<<"4">>,<<"3">>,<<"2">>,<<"1">>]</font></p>
<p class=""><font face="courier new, monospace">77> Rest2. </font></p>
<p class=""><font face="courier new, monospace">0</font></p>
<p class=""><font face="courier new, monospace">78></font></p><p class=""><br></p><p class="">In practice, the kind of structure demonstrated in L4 is being returned by a function from another library I'm trying to use, but I'm trying to understand what's going on in general.</p></div></div>