Programming, Functional Programming, Scala, Tutorial, Venkat Subramaniam.
stockPrice) ​ } ​ ​ highestPricedStock print ​ //Top stock is AAPL at price $377.41 Let’s walk through the code to see what we did. First we create an instance of ArrayBuffer, which is a mutable collection. We invoke the getPrice() function for each ticker and populate the stockPrices ArrayBuffer