title: How can I reduce the following stream of strings to a boolean value
body: <p>I have following stream written as so:</p>
  <pre><code>private static Set&lt;Integer&gt; validBinNumberLength =  new HashSet&lt;&gt;();
  
  boolean valid = binDataRequest.getAccountBinNumbers().stream().reduce(true, (subTotal, element) -&gt;
                      Boolean.logicalAnd(subTotal, validBinNumberLength.contains(element.length())));
  </code></pre>
  <p>I want to make sure that the length of all account numbers are within the domain of validNumberBinLength.</p>
  <p>I am getting the error that subTotal is being seen as a string rather than boolean. How can I work around this?</p>
  <p>Will the stream stop evaluating once a value is returned as false?. If not, how can I implement this lazy evaluation in the stream. I am doing this because I don't want to use old school for loops.</p>