Skip to content

Commit 47af936

Browse files
committed
---
yaml --- r: 21615 b: refs/heads/snap-stage3 c: ef880f2 h: refs/heads/master i: 21613: 5961ac4 21611: 1eb960a 21607: d68800e 21599: c64a951 v: v3
1 parent 1f2bc8e commit 47af936

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 02b1c32e4d3c607da8b3a48640e597f089375765
4+
refs/heads/snap-stage3: ef880f22450c4f7e455f431ff4603f90d443b545
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/doc/rust.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,9 +1027,9 @@ pure fn lt_42(x: int) -> bool {
10271027
Pure functions may call other pure functions:
10281028

10291029
~~~~{.xfail-test}
1030-
pure fn pure_length<T>(ls: list<T>) -> uint { /* ... */ }
1030+
pure fn pure_length<T>(ls: List<T>) -> uint { /* ... */ }
10311031
1032-
pure fn nonempty_list<T>(ls: list<T>) -> bool { pure_length(ls) > 0u }
1032+
pure fn nonempty_list<T>(ls: List<T>) -> bool { pure_length(ls) > 0u }
10331033
~~~~
10341034

10351035
*TODO:* should actually define referential transparency.
@@ -1055,14 +1055,14 @@ An example of a pure function that uses an unchecked block:
10551055
~~~~
10561056
# import std::list::*;
10571057
1058-
fn pure_foldl<T, U: copy>(ls: list<T>, u: U, f: fn(&&T, &&U) -> U) -> U {
1058+
fn pure_foldl<T, U: copy>(ls: List<T>, u: U, f: fn(&&T, &&U) -> U) -> U {
10591059
match ls {
1060-
nil => u,
1061-
cons(hd, tl) => f(hd, pure_foldl(*tl, f(hd, u), f))
1060+
Nil => u,
1061+
Cons(hd, tl) => f(hd, pure_foldl(*tl, f(hd, u), f))
10621062
}
10631063
}
10641064
1065-
pure fn pure_length<T>(ls: list<T>) -> uint {
1065+
pure fn pure_length<T>(ls: List<T>) -> uint {
10661066
fn count<T>(_t: T, &&u: uint) -> uint { u + 1u }
10671067
unchecked {
10681068
pure_foldl(ls, 0u, count)

0 commit comments

Comments
 (0)