Function frust::hlist::h_cons [] [src]

pub fn h_cons<H, T: HList>(h: H, tail: T) -> HCons<H, T>

Takes an element and an Hlist and returns another one with the element prepended to the original list. The original list is consumed


let h_list = h_cons("what", h_cons(1.23f32, HNil));
let (h1, tail) = h_list.pop();
let (h2, _) = tail.pop();
assert_eq!(h1, "what");
assert_eq!(h2, 1.23f32);