fork download
  1. fn f11040(v: Vec<i32>) -> Vec<i32> {
  2. let (mut o, mut e) : (Vec<i32>, Vec<i32>) = v.iter().partition(|&n| (n & 1) == 1);
  3. o.append(&mut e);
  4. o
  5. }
  6. fn main() {
  7. print!("{:?}", f11040(vec!(-1, 2, 8, -9, -2, -3, -6, -10, -8, 5, 7, 9, 7)));
  8. }
  9.  
Success #stdin #stdout 0s 4188KB
stdin
Standard input is empty
stdout
[-1, -9, -3, 5, 7, 9, 7, 2, 8, -2, -6, -10, -8]