Skip to content

Commit 9323095

Browse files
committed
---
yaml --- r: 65463 b: refs/heads/master c: f8cef24 h: refs/heads/master i: 65461: bbcc4bb 65459: a82814a 65455: a3f2b4c v: v3
1 parent e0b8169 commit 9323095

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 3869f7a99c54f00d69b19298f215cbc4a84ce5a8
2+
refs/heads/master: f8cef24b5e1decd9ce97c7635dd5a903a5b6fc9b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/libstd/num/uint_macros.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,18 @@ pub fn ge(x: $T, y: $T) -> bool { x >= y }
6464
pub fn gt(x: $T, y: $T) -> bool { x > y }
6565

6666
#[inline(always)]
67-
///
68-
/// Iterate over the range [`start`,`start`+`step`..`stop`)
69-
///
67+
/**
68+
* Iterate through a range with a given step value.
69+
*
70+
* # Examples
71+
* ~~~ {.rust}
72+
* let nums = [1,2,3,4,5,6,7];
73+
*
74+
* for uint::range_step(0, nums.len() - 1, 2) |i| {
75+
* println(fmt!("%d & %d", nums[i], nums[i+1]));
76+
* }
77+
* ~~~
78+
*/
7079
pub fn range_step(start: $T, stop: $T, step: $T_SIGNED, it: &fn($T) -> bool) -> bool {
7180
let mut i = start;
7281
if step == 0 {

0 commit comments

Comments
 (0)