[][src]Trait agnes::cons::PushFront

pub trait PushFront<H> {
    type Output;
    fn push_front(self, head: H) -> Self::Output;
}

Trait for adding a new element to the front of a heterogeneous list.

Associated Types

type Output

The resulting cons-list type after pushing the specified H element to the front of the existing list.

Loading content...

Required methods

fn push_front(self, head: H) -> Self::Output

Add an element to the front of this heterogeneous list.

Loading content...

Implementors

impl<NewH> PushFront<NewH> for Nil[src]

type Output = Cons<NewH, Nil>

impl<NewH, H, T> PushFront<NewH> for Cons<H, T>[src]

type Output = Cons<NewH, Self>

Loading content...