abstract class Direction; case class Sell() extends Direction; case class Buy() extends Direction; case class Trade(direction : Direction, amount : Int, security : String); val trades = List( Trade(Buy(), 100, "AAPL"), Trade(Buy(), 200, "MSFT"), Trade(Buy(), 150, "INTC"), Trade(Buy(), 100, "AAPL"), Trade(Sell(), 100, "MSFT"), Trade(Sell(), 50, "INTC"), Trade(Buy(), 100, "AAPL") );
Wednesday, September 26, 2012
Group By Task
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment