title: How to check if a given table is a valid sequence?
body: <pre class="lang-lua prettyprint-override"><code>local seq = { 1, 2, 3, 4, 5 } -- obviously, it's a sequence.
  local non_seq = { 1, 2, 3, nil, 5 } -- but it's not.
  </code></pre>
  <p>The defination about <strong>sequence</strong>: <a href="https://www.lua.org/manual/5.3/manual.html#3.4.7" rel="nofollow noreferrer">The Length Operator</a></p>
  <p>This question is in chapter 5 of Programming in Lua 4st.</p>
  <p>Any comments I would greatly appreciate</p>