Skip to content

Instantly share code, notes, and snippets.

Created September 18, 2016 10:18
What would you like to do?
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 -> = oid
| Cancel c -> = oid
| Cancel_replace cr -> = oid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment