datastructuretraits

data structure collection traits

```rust

[macrouse] extern crate datastructure_traits;

use datastructuretraits::*;

fn useseq<'a, S>(s: &'a mut S) -> usize where S: SeqMut<'a, usize>, &'a S: IntoIterator, &'a mut S: IntoIterator, { if s.len() >= 5 { s.getmut(4).map(|v| { *v = 0; });
} else { s.insert(0, 1); }

let mut avg = 0;
let len = s.len();

for v in s.into_iter() {
    avg += *v;
}

avg / len

}

fn main() { let mut v: Vec = collection![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; println!("{:?}", use_seq(&mut v)); } ```