Mercurial > urweb
annotate src/option_key_fn.sml @ 2291:50ad02829abd
Make cache flushes happen immediately instead of at end of transaction.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Tue, 17 Nov 2015 02:44:37 -0500 |
parents | e4a7e3cd6f11 |
children |
rev | line source |
---|---|
ziv@2244 | 1 functor OptionKeyFn(K : ORD_KEY) |
ziv@2244 | 2 : ORD_KEY where type ord_key = K.ord_key option = struct |
ziv@2240 | 3 |
ziv@2240 | 4 type ord_key = K.ord_key option |
ziv@2240 | 5 |
ziv@2240 | 6 val compare = |
ziv@2240 | 7 fn (NONE, NONE) => EQUAL |
ziv@2240 | 8 | (NONE, _) => LESS |
ziv@2240 | 9 | (_, NONE) => GREATER |
ziv@2240 | 10 | (SOME x, SOME y) => K.compare (x, y) |
ziv@2240 | 11 |
ziv@2240 | 12 end |