annotate src/pair_key_fn.sml @ 2277:6bce459ca581

Add new files missing from previous commit.
author Ziv Scully <ziv@mit.edu>
date Mon, 09 Nov 2015 13:38:04 -0500
parents
children
rev   line source
ziv@2277 1 functor PairKeyFn (structure I : ORD_KEY
ziv@2277 2 structure J : ORD_KEY)
ziv@2277 3 : ORD_KEY where type ord_key = I.ord_key * J.ord_key = struct
ziv@2277 4
ziv@2277 5 type ord_key = I.ord_key * J.ord_key
ziv@2277 6
ziv@2277 7 fun compare ((i1, j1), (i2, j2)) =
ziv@2277 8 case I.compare (i1, i2) of
ziv@2277 9 EQUAL => J.compare (j1, j2)
ziv@2277 10 | ord => ord
ziv@2277 11
ziv@2277 12 end