From 2e8a8390d5b6e604a908e01b925f3ef003e4a68d Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 28 Oct 2011 13:34:17 -0700 Subject: [PATCH] stdlib: Rename the 'ls_' param in list functions to 'ls' --- src/lib/list.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/list.rs b/src/lib/list.rs index f1851a2564ea..2b22fb97c8e6 100644 --- a/src/lib/list.rs +++ b/src/lib/list.rs @@ -40,13 +40,13 @@ and so on, returning the accumulated result. Parameters: -ls_ - The list to fold +ls - The list to fold u - The initial value f - The function to apply */ -fn foldl(ls_: list, u: U, f: block(T, U) -> U) -> U { +fn foldl(ls: list, u: U, f: block(T, U) -> U) -> U { let accum: U = u; - let ls = ls_; + let ls = ls; while true { alt ls { 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. When function `f` returns true then an option containing the element is returned. If `f` matches no elements then none is returned. */ -fn find(ls_: list, f: block(T) -> option::t) -> option::t { - let ls = ls_; +fn find(ls: list, f: block(T) -> option::t) -> option::t { + let ls = ls; while true { alt ls { cons(hd, tl) { @@ -83,8 +83,8 @@ Function: has Returns true if a list contains an element with the given value */ -fn has(ls_: list, elt: T) -> bool { - let ls = ls_; +fn has(ls: list, elt: T) -> bool { + let ls = ls; while true { alt ls { cons(hd, tl) { if elt == hd { ret true; } else { ls = *tl; } }