Programming, Functional Programming, Scala, Tutorial, Venkat Subramaniam.
less than or equal to $500, false otherwise. Here’s how we would approach the problem in imperative style: ​ import scala.collection.mutable.ArrayBuffer ​ ​ val stockPrices = new ArrayBuffer[StockPrice] ​ for(ticker <- tickers) { ​ stockPrices += getPrice(ticker) ​ } ​ ​ val stockPricesLessThan500