Apt installation requests
[hcoop/portal.git] / util.sml
index 6f067ac..579482d 100644 (file)
--- a/util.sml
+++ b/util.sml
@@ -1,6 +1,12 @@
 structure Util :> UTIL =
 struct
 
+datatype 'a flat_element =
+        BEGIN
+       | END
+       | ITEM of 'a
+type 'a flat_tree = 'a flat_element list
+
 fun printInt n =
     Web.print (if n < 0 then
                   "-" ^ Int.toString (~n)
@@ -21,4 +27,6 @@ fun makeSet f items =
       | [usr] => "(" ^ f usr ^ ")"
       | usr::rest => foldl (fn (usr, s) => s ^ ", " ^ f usr) ("(" ^ f usr) rest ^ ")"
 
+fun neg (r : real) = ~r
+
 end
\ No newline at end of file