lists

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

Library containing implementations of various sequential data-structures.

Testing

```bash $ cd lists $ cargo test ...

If things go well during the tests you should see ok as the test result.

```

Examples

DoublyLinkedList Sum

```rust use lists::dl_list;

/// Creates a new DoublyLinkedList, and then adds all elements together into a sum. fn main() { let list = dllist![1, 2, 3, 4, 5]; let sum = list.intoiter().sum::();

assert_eq!(sum, 15);

} ```

SinglyLinkedList Sum

```rust use lists::sl_list;

/// Creates a new SinglyLinkedList, and then adds all elements together into a sum. fn main() { let list = sllist![1, 2, 3, 4, 5]; let sum = list.intoiter().sum::();

assert_eq!(sum, 15);

} ```

License

MIT