[MLton-commit] r5336

Vesa Karvonen vesak at mlton.org
Mon Feb 26 11:58:08 PST 2007


Added appClear.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/misc-util/unstable/queue.sig
U   mltonlib/trunk/com/ssh/misc-util/unstable/queue.sml

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

Modified: mltonlib/trunk/com/ssh/misc-util/unstable/queue.sig
===================================================================
--- mltonlib/trunk/com/ssh/misc-util/unstable/queue.sig	2007-02-26 19:06:00 UTC (rev 5335)
+++ mltonlib/trunk/com/ssh/misc-util/unstable/queue.sig	2007-02-26 19:58:08 UTC (rev 5336)
@@ -17,4 +17,6 @@
 
    val deque : 'a t -> 'a Option.t
    val enque : 'a t -> 'a Effect.t
+
+   val appClear : 'a Effect.t -> 'a t Effect.t
 end

Modified: mltonlib/trunk/com/ssh/misc-util/unstable/queue.sml
===================================================================
--- mltonlib/trunk/com/ssh/misc-util/unstable/queue.sml	2007-02-26 19:06:00 UTC (rev 5335)
+++ mltonlib/trunk/com/ssh/misc-util/unstable/queue.sml	2007-02-26 19:58:08 UTC (rev 5336)
@@ -38,4 +38,9 @@
        case N.get (!front) of
           NONE => NONE
         | SOME (a, n) => (front := n ; SOME a)
+
+   fun appClear ef q =
+       case deque q of
+          NONE => ()
+        | SOME v => (ef v : Unit.t ; appClear ef q)
 end




More information about the MLton-commit mailing list