title: Lua get first N elements of a table
body: <p>Is there a method for getting the first N elements of a table? And more generally, give me the first N elements starting from position P. </p>
  
  <p>Or do I have to write a function and use <code>pairs</code> to do so? </p>