title: filter until some condition is met for the first time
body: <p>It's not a real world example, I over-simplified it. Giving this array:</p>
  
  <pre><code>const a = [1,2,3,4,5,6,7,8,4,5]; // Etc. Random numbers after.
  </code></pre>
  
  <p>I want to filter it to have only those matching a pattern (let's say greater than 3 for this trivial example) until something appends for the first time (let's say element is greater than 7)</p>
  
  <p>So for this example, I just want: <code>[4,5,6,7]</code>. But with <code>filter</code>, I would have the trailing <code>4</code> and <code>5</code>:</p>
  
  <pre><code>const a = [1,2,3,4,5,6,7,8,4,5].filter((v) =&gt; v &gt; 3)
  // returns: [4, 5, 6, 7, 8, 4, 5]
  </code></pre>
  
  <p>So I want to get item from an array and definitively stop after a condition. How can I filter then stop after the first time a condition is not met? (without <code>for</code> loop, I want to keep it "functional-like")</p>
  
  <pre><code>const a = [1,2,3,4,5,6,7,8,4,5,1,2,976,-1].awsome_function();
  // returns: [4, 5, 6, 7, 8] because it stopped after the first 8.
  </code></pre>