2011-08-15 17:34:47 -05:00
|
|
|
use std;
|
2011-12-13 18:25:51 -06:00
|
|
|
import vec;
|
2011-08-15 17:34:47 -05:00
|
|
|
|
|
|
|
fn main() {
|
2011-08-19 17:16:48 -05:00
|
|
|
let v =
|
2012-06-25 22:00:46 -05:00
|
|
|
vec::map2([1, 2, 3, 4, 5]/~,
|
|
|
|
[true, false, false, true, true]/~,
|
2011-12-16 08:27:50 -06:00
|
|
|
{|i, b| if b { -i } else { i } });
|
2011-12-22 19:53:53 -06:00
|
|
|
log(error, v);
|
2012-06-25 22:00:46 -05:00
|
|
|
assert (v == [-1, 2, 3, -4, -5]/~);
|
2011-08-15 17:34:47 -05:00
|
|
|
}
|