isingly it is very slow to get this using <code>sapply(gL, length)</code> (or at least it used to be very slow). There is a dedicated function for this:</p>
<pre class="r"><code>elementLengths(gL)</code></pre>
<pre><code>## gr1 gr2 
##   4   4</code></pre>
<p>We have a new <code>XXapply</code> function with the fancy name <code>endoapply</code>. This is used when you want to apply a function which maps a <code>GRanges</code> into a <code>GRanges</code>, say a <code>shift</code> or <code>resize</code>.</p>
<