lists

Crates.iolists
lib.rslists
version2.3.0
sourcesrc
created_at2022-01-31 04:09:27.472744
updated_at2022-02-07 07:04:49.734727
descriptionLibrary containing implementations of various sequential data-structures.
homepage
repositoryhttps://github.com/c1m50c/lists
max_upload_size
id524370
size57,235
Pere Wells (c1m50c)

documentation

README

lists

build docs.rs crates.io license lines of code github stars

Library containing implementations of various sequential data-structures.

Testing

$ cd lists
$ cargo test
...
# If things go well during the tests you should see `ok` as the test result.

Examples

DoublyLinkedList Sum
use lists::dl_list;


/// Creates a new `DoublyLinkedList`, and then adds all elements together into a sum.
fn main() {
    let list = dl_list![1, 2, 3, 4, 5];
    let sum = list.into_iter().sum::<i32>();
    
    assert_eq!(sum, 15);
}
SinglyLinkedList Sum
use lists::sl_list;


/// Creates a new `SinglyLinkedList`, and then adds all elements together into a sum.
fn main() {
    let list = sl_list![1, 2, 3, 4, 5];
    let sum = list.into_iter().sum::<i32>();
    
    assert_eq!(sum, 15);
}

License

MIT

Commit count: 0

cargo fmt