It's hard to type when the cursor is not where you are actually typing.
This commit is contained in:
parent
7e5b64bafe
commit
fb7f0a4ae1
1 changed files with 1 additions and 1 deletions
|
@ -1981,7 +1981,7 @@ fn for_rev<T>(vector: ~[T], action fn(T)) {
|
|||
|
||||
fn map<T, U>(vector: ~[T], function :fn(T) -> U) -> ~[U] {
|
||||
let mut accumulator = ~[];
|
||||
for vector.each |element| { vec::push(accumulator, function(eltement)); }
|
||||
for vector.each |element| { vec::push(accumulator, function(element)); }
|
||||
ret accumulator;
|
||||
}
|
||||
~~~~
|
||||
|
|
Loading…
Add table
Reference in a new issue