macro_rules! sl_list {
    ( $( $element: expr ), * ) => { ... };
}
Expand description

Shorthand syntax for creating a SinglyLinkedList. Time complexity is O(n).

Example

let list = sl_list![1, 2, 3, 4, 5];
 
assert_eq!(list.len(), 5);
assert_eq!(list.front(), Some(&1));
assert_eq!(list.back(), Some(&5));