aboutsummaryrefslogtreecommitdiff
path: root/src/lib/_int.rs
diff options
context:
space:
mode:
authorRoy Frostig <[email protected]>2010-08-03 17:52:35 -0700
committerRoy Frostig <[email protected]>2010-08-03 17:52:35 -0700
commit085790a73a0527a06055ab0823066bc407a52741 (patch)
tree87a68308532ff48ba73bcfb990b82dcc9213746a /src/lib/_int.rs
parentAvoid mem cmp mem in trans even though it's an X86ism becase we don't always ... (diff)
downloadrust-085790a73a0527a06055ab0823066bc407a52741.tar.xz
rust-085790a73a0527a06055ab0823066bc407a52741.zip
More stdlib hashmap bits (plus some drive-by extras).
Diffstat (limited to 'src/lib/_int.rs')
-rw-r--r--src/lib/_int.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/_int.rs b/src/lib/_int.rs
index 29144a82..9b756675 100644
--- a/src/lib/_int.rs
+++ b/src/lib/_int.rs
@@ -13,6 +13,11 @@ fn ne(int x, int y) -> bool { ret x != y; }
fn ge(int x, int y) -> bool { ret x >= y; }
fn gt(int x, int y) -> bool { ret x > y; }
+fn positive(int x) -> bool { ret x > 0; }
+fn negative(int x) -> bool { ret x < 0; }
+fn nonpositive(int x) -> bool { ret x <= 0; }
+fn nonnegative(int x) -> bool { ret x >= 0; }
+
iter range(mutable int lo, int hi) -> int {
while (lo < hi) {
put lo;