Add uint::min

This commit is contained in:
Jesse Ruderman 2011-07-10 16:09:48 -07:00 committed by Brian Anderson
parent ea69f48eac
commit fa78fee4de

View File

@ -24,6 +24,8 @@
fn max(uint x, uint y) -> uint { if (x > y) { ret x; } ret y; }
fn min(uint x, uint y) -> uint { if (x > y) { ret y; } ret x; }
iter range(uint lo, uint hi) -> uint {
auto lo_ = lo;
while (lo_ < hi) { put lo_; lo_ += 1u; }