[MLton-commit] r4859

Vesa Karvonen vesak at mlton.org
Wed Nov 22 08:26:57 PST 2006


Minor refactoring.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/cmp.sml

----------------------------------------------------------------------

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/cmp.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/cmp.sml	2006-11-22 16:26:08 UTC (rev 4858)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/cmp.sml	2006-11-22 16:26:48 UTC (rev 4859)
@@ -17,7 +17,11 @@
            == = isEqual   o cmp, != = not o isEqual   o cmp,
            >  = isGreater o cmp, >= = not o isLess    o cmp}
 
-      fun max cmp (x, y) = if isLess (cmp (x, y)) then y else x
-      fun min cmp (x, y) = if isGreater (cmp (x, y)) then y else x
+      local
+         fun mk is cmp (x, y) = if is (cmp (x, y)) then y else x
+      in
+         fun max ? = mk isLess ?
+         fun min ? = mk isGreater ?
+      end
    end
 end




More information about the MLton-commit mailing list