diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-01-23 14:59:00 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-01-23 19:06:33 -0800 |
| commit | 5e13d19cc07a1e8fbf478d21cabbd7b9f80e3b54 (patch) | |
| tree | c1fc2dd89c651efa1daa4e7d63c5b82b2a5f4bd2 /src/libstd/list.rs | |
| parent | 04351a84ca342f4580e40b9c195b5403b864090b (diff) | |
| download | rust-5e13d19cc07a1e8fbf478d21cabbd7b9f80e3b54.tar.gz rust-5e13d19cc07a1e8fbf478d21cabbd7b9f80e3b54.zip | |
s/block()/fn()/g
Diffstat (limited to 'src/libstd/list.rs')
| -rw-r--r-- | src/libstd/list.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/list.rs b/src/libstd/list.rs index b05f895c327..2081a21de23 100644 --- a/src/libstd/list.rs +++ b/src/libstd/list.rs @@ -46,7 +46,7 @@ ls - The list to fold z - The initial value f - The function to apply */ -fn foldl<T: copy, U>(ls: list<U>, z: T, f: block(T, U) -> T) -> T { +fn foldl<T: copy, U>(ls: list<U>, z: T, f: fn(T, U) -> T) -> T { let accum: T = z; iter(ls) {|elt| accum = f(accum, elt);} accum @@ -61,7 +61,7 @@ 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: copy, U: copy>(ls: list<T>, f: block(T) -> option::t<U>) +fn find<T: copy, U: copy>(ls: list<T>, f: fn(T) -> option::t<U>) -> option::t<U> { let ls = ls; while true { @@ -164,7 +164,7 @@ Function: iter Iterate over a list */ -fn iter<T>(l: list<T>, f: block(T)) { +fn iter<T>(l: list<T>, f: fn(T)) { alt l { cons(hd, tl) { f(hd); |
