Hi,
I have a question regarding '-' as a prefix to a function argument as
used in the task-perf-word-count.rs test file:
-----------------------------------------------
rust-0.2\src\test\bench\task-perf-word-count.rs:
fn map_reduce(-inputs: [str]) { ....
fn main(argv: [str]) {
let inputs = if vec::len(argv) < 2u {
[input1(), input2(), input3()]
} else {
vec::map(vec::slice(argv, 1u, vec::len(argv)),
{|f| result::get(io::read_whole_file_str(f)) })
};
let start = time::precise_time_ns();
map_reduce::map_reduce(inputs);
....
-----------------------------------------------
What does the minus sign mean when used as a prefix for the argument
"input" in the function map_reduce()?
I looked for this in the tutorial and the reference manual but I could
only find reference to '+' in the 7.4 "Argument passing styles" :
"Then there is the by-copy style, written +."
Thanks
Peter Ronnquist
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev