annotate src/triple_key_fn.sml @ 2246:4769b27aa436

Merge.
author Ziv Scully <ziv@mit.edu>
date Sun, 02 Aug 2015 18:26:44 -0700
parents 88cc0f44c940
children
rev   line source
ziv@2240 1 functor TripleKeyFn (structure I : ORD_KEY
ziv@2240 2 structure J : ORD_KEY
ziv@2240 3 structure K : ORD_KEY)
ziv@2240 4 : ORD_KEY where type ord_key = I.ord_key * J.ord_key * K.ord_key = struct
ziv@2240 5
ziv@2240 6 type ord_key = I.ord_key * J.ord_key * K.ord_key
ziv@2240 7
ziv@2240 8 fun compare ((i1, j1, k1), (i2, j2, k2)) =
ziv@2240 9 case I.compare (i1, i2) of
ziv@2240 10 EQUAL => (case J.compare (j1, j2) of
ziv@2240 11 EQUAL => K.compare (k1, k2)
ziv@2240 12 | ord => ord)
ziv@2240 13 | ord => ord
ziv@2240 14
ziv@2240 15 end