about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-10-28 13:34:17 -0700
committerBrian Anderson <banderson@mozilla.com>2011-10-28 13:34:17 -0700
commit2e8a8390d5b6e604a908e01b925f3ef003e4a68d (patch)
tree5f4205a87889c22a2fc1b230f12349e84692a95f /src
parent1da99cdf687e91e5df579d518a8b16871b0686a1 (diff)
downloadrust-2e8a8390d5b6e604a908e01b925f3ef003e4a68d.tar.gz
rust-2e8a8390d5b6e604a908e01b925f3ef003e4a68d.zip
stdlib: Rename the 'ls_' param in list functions to 'ls'
Diffstat (limited to 'src')
-rw-r--r--src/lib/list.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/list.rs b/src/lib/list.rs
index f1851a2564e..2b22fb97c8e 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<T, U>(ls_: list<T>, u: U, f: block(T, U) -> U) -> U {
+fn foldl<T, U>(ls: list<T>, 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<T, U>(ls_: list<T>, f: block(T) -> option::t<U>) -> option::t<U> {
-    let ls = ls_;
+fn find<T, U>(ls: list<T>, f: block(T) -> option::t<U>) -> option::t<U> {
+    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<T>(ls_: list<T>, elt: T) -> bool {
-    let ls = ls_;
+fn has<T>(ls: list<T>, elt: T) -> bool {
+    let ls = ls;
     while true {
         alt ls {
           cons(hd, tl) { if elt == hd { ret true; } else { ls = *tl; } }