annotate src/option_key_fn.sml @ 2240:88cc0f44c940

Rename C functions and remove functors nested inside modules.
author Ziv Scully <ziv@mit.edu>
date Sun, 19 Jul 2015 19:03:11 -0700
parents
children e4a7e3cd6f11
rev   line source
ziv@2240 1 functor OptionKeyFn(K : ORD_KEY) : ORD_KEY = struct
ziv@2240 2
ziv@2240 3 type ord_key = K.ord_key option
ziv@2240 4
ziv@2240 5 val compare =
ziv@2240 6 fn (NONE, NONE) => EQUAL
ziv@2240 7 | (NONE, _) => LESS
ziv@2240 8 | (_, NONE) => GREATER
ziv@2240 9 | (SOME x, SOME y) => K.compare (x, y)
ziv@2240 10
ziv@2240 11 end