Skip to content

Commit c99b47f

Browse files
committed
---
yaml --- r: 6020 b: refs/heads/master c: 2e8a839 h: refs/heads/master v: v3
1 parent e54c1a0 commit c99b47f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 1da99cdf687e91e5df579d518a8b16871b0686a1
2+
refs/heads/master: 2e8a8390d5b6e604a908e01b925f3ef003e4a68d

trunk/src/lib/list.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ and so on, returning the accumulated result.
4040
4141
Parameters:
4242
43-
ls_ - The list to fold
43+
ls - The list to fold
4444
u - The initial value
4545
f - The function to apply
4646
*/
47-
fn foldl<T, U>(ls_: list<T>, u: U, f: block(T, U) -> U) -> U {
47+
fn foldl<T, U>(ls: list<T>, u: U, f: block(T, U) -> U) -> U {
4848
let accum: U = u;
49-
let ls = ls_;
49+
let ls = ls;
5050
while true {
5151
alt ls {
5252
cons(hd, tl) { accum = f(hd, accum); ls = *tl; }
@@ -65,8 +65,8 @@ Apply function `f` to each element of `v`, starting from the first.
6565
When function `f` returns true then an option containing the element
6666
is returned. If `f` matches no elements then none is returned.
6767
*/
68-
fn find<T, U>(ls_: list<T>, f: block(T) -> option::t<U>) -> option::t<U> {
69-
let ls = ls_;
68+
fn find<T, U>(ls: list<T>, f: block(T) -> option::t<U>) -> option::t<U> {
69+
let ls = ls;
7070
while true {
7171
alt ls {
7272
cons(hd, tl) {
@@ -83,8 +83,8 @@ Function: has
8383
8484
Returns true if a list contains an element with the given value
8585
*/
86-
fn has<T>(ls_: list<T>, elt: T) -> bool {
87-
let ls = ls_;
86+
fn has<T>(ls: list<T>, elt: T) -> bool {
87+
let ls = ls;
8888
while true {
8989
alt ls {
9090
cons(hd, tl) { if elt == hd { ret true; } else { ls = *tl; } }

0 commit comments

Comments
 (0)