Crates.io | immut_list |
lib.rs | immut_list |
version | 0.1.0 |
source | src |
created_at | 2017-10-21 16:32:30.942121 |
updated_at | 2017-10-21 16:32:30.942121 |
description | immutable persistent list |
homepage | https://gitlab.com/nathanfaucett/rs-immut_list |
repository | https://gitlab.com/nathanfaucett/rs-immut_list.git |
max_upload_size | |
id | 36494 |
size | 12,642 |
immutable persistent list
extern crate immut_list;
extern crate data_structure_traits;
use immut_list::ImmutList;
use data_structure_traits::*;
fn main() {
let mut a = ImmutList::new();
for i in 0..32 {
a = a.push(i);
}
let mut index = 32;
for i in &a {
index -= 1;
assert_eq!(i, &index);
}
println!("{:?}", a);
}