diff --git a/src/lib/fun_treemap.rs b/src/lib/fun_treemap.rs index 4e0aea3f319..1126a13d449 100644 --- a/src/lib/fun_treemap.rs +++ b/src/lib/fun_treemap.rs @@ -84,7 +84,7 @@ Function: traverse Visit all pairs in the map in order. */ -fn traverse(m: treemap, f: fn(K, V)) { +fn traverse(m: treemap, f: block(K, V)) { alt *m { empty. { } node(@k, @v, _, _) { diff --git a/src/lib/treemap.rs b/src/lib/treemap.rs index 68d732449c6..84fff4992f0 100644 --- a/src/lib/treemap.rs +++ b/src/lib/treemap.rs @@ -83,7 +83,7 @@ Function: traverse Visit all pairs in the map in order. */ -fn traverse(m: treemap, f: fn@(K, V)) { +fn traverse(m: treemap, f: block(K, V)) { alt *m { empty. { } node(k, v, _, _) { diff --git a/src/lib/vec.rs b/src/lib/vec.rs index c4d68590b4d..3763a13a37a 100644 --- a/src/lib/vec.rs +++ b/src/lib/vec.rs @@ -48,7 +48,7 @@ Type: init_op A function used to initialize the elements of a vector. */ -type init_op = fn@(uint) -> T; +type init_op = block(uint) -> T; /* Function: init_fn @@ -327,7 +327,7 @@ v - The vector to grow n - The number of elements to add init_fn - A function to call to retreive each appended element's value */ -fn grow_fn(&v: [T], n: uint, init_fn: fn(uint) -> T) { +fn grow_fn(&v: [T], n: uint, init_fn: block(uint) -> T) { reserve(v, next_power_of_two(len(v) + n)); let i: uint = 0u; while i < n { v += [init_fn(i)]; i += 1u; } @@ -513,7 +513,7 @@ Function: position_pred Find the first index for which the value matches some predicate */ -fn position_pred(f: fn(T) -> bool, v: [T]) -> option::t { +fn position_pred(f: block(T) -> bool, v: [T]) -> option::t { let i: uint = 0u; while i < len(v) { if f(v[i]) { ret some::(i); } i += 1u; } ret none;