Created
September 18, 2016 10:18
-
-
Save gsg/8c3d4ad005a7584a369a6db2fb6925c6 to your computer and use it in GitHub Desktop.
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
type instruction = | |
| Order of {id: int; price: float; size: int} | |
| Cancel of {id: int} | |
| Cancel_replace of {id: int; new_price: float; new_size: int} | |
let filter_by_oid instructions oid = | |
List.filter (function | |
| Order o -> o.id = oid | |
| Cancel c -> c.id = oid | |
| Cancel_replace cr -> cr.id = oid) | |
instructions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment