 &gt; llists:to_list(
  &gt;  llists:filtermap(
  &gt;   fun(X) -&gt; case X rem 2 of 0 -&gt; {true, X div 2}; _ -&gt; false end end,
  &gt;   llists:seq(1, 5))).
  [1,2]</pre></p>

<h3 class="function"><a name="flatlength-1">flatlength/1</a></h3>
<div class="spec">
<p><tt>flatlength(DeepIterator) -&gt; Length</tt>
<ul class="definitions"><li><tt>DeepIterator = <a href="#type-iterator">iterator</a>(any() | <a href="#type-iterator">iterator()</a>)</tt></li><li><tt>Length = non_neg_integer()</tt></li></ul></p