Last active
December 10, 2015 01:48
-
-
Save prystupa/4361753 to your computer and use it in GitHub Desktop.
Implementation of OrderBook to pass "adding a simple order to the book"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OrderBook(val side: Side, orderTypes: (Order => OrderType)) { | |
private var limitBook: List[Order] = Nil | |
def add(order: Order) { | |
book = order :: limitBook; | |
} | |
def orders(): List[Order] = limitBook | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment