about summary refs log tree commit diff
path: root/src/lib/util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util.rs')
-rw-r--r--src/lib/util.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/util.rs b/src/lib/util.rs
index 72844d5f830..2f797f69216 100644
--- a/src/lib/util.rs
+++ b/src/lib/util.rs
@@ -11,6 +11,18 @@ fn rational_leq(&rational x, &rational y) -> bool {
     ret x.num * y.den <= y.num * x.den;
 }
 
+fn fst[T, U](&tup(T, U) x) -> T {
+    ret x._0;
+}
+
+fn snd[T, U](&tup(T, U) x) -> U {
+    ret x._1;
+}
+
+fn orb(&bool a, &bool b) -> bool {
+    ret a || b;
+}
+
 // Local Variables:
 // mode: rust;
 // fill-column: 78;