title: break out of filter() function
body: <p>I'd like to optimize my functions which rely on filter(). In some cases I want to break out of them when they reach a certain elements. (For example, I may have an array of distinct elements. Or, I just want to implement a kind of findFirst functionality.) In such instances it seems inefficient for the function to continue until the end of the array.</p>
  
  <p>This is something very easy with loops, but I would like to apply the optimisations to functional programming principals. (The compiler wouldn't be able to perform such a optimization by itself, since it doesn't know my array and my intention.)</p>
  
  <p>Can this be done?</p>