[−][src]Trait lhlist::Len
Provides the length of a cons-list.
Since cons-list types are statically defined, this length is known at compile-time.
Example
use lhlist::{Cons, Len, Nil}; type MyList = Cons<usize, Cons<&'static str, Cons<f32, Nil>>>; assert_eq!(MyList::LEN, 3usize); let list: MyList = cons![8, "Hello!", 4.5]; assert_eq!(list.len(), 3usize);