Programming, Functional Programming, Scala, Tutorial, Venkat Subramaniam.
with the StockPrice instances. Second, we iterate over these stock prices and pick only stocks that are valued less than $500 and add to the stockPricesLessThan500 ArrayBuffer. This results in possibly fewer elements than we started with. Finally, we loop through the second collection to pick the