macro_rules! conslist {
() => { ... };
( $($x:expr),* ) => { ... };
}Expand description
Construct a list from a sequence of elements.
ยงExamples
Here are some different ways of constructing a list of three numbers 1, 2 and 3:
assert_eq!(conslist![1, 2, 3], ConsList::from(vec![1, 2, 3]));
assert_eq!(conslist![1, 2, 3], cons(1, cons(2, cons(3, ConsList::new()))));