Programming, Functional Programming, Scala, Tutorial, Venkat Subramaniam.
StockPrice) = ​ if(stockPrice1.price > stockPrice2.price) stockPrice1 ​ else stockPrice2 ​ ​ def isNotOver500(stockPrice : StockPrice) = stockPrice.price < 500 Given two StockPrice instances, the pickHighPriced function returns the higher priced. The isNotOver500 will return a true if the price is