[][src]Enum fp_collections::list::List

pub enum List<T> {
    Cons(T, Box<List<T>>),
    Nil,
}

Variants

Cons(T, Box<List<T>>)
Nil

Methods

impl<T: Eq> List<T>[src]

pub fn new<A>() -> Self[src]

pub fn is_empty(&self) -> bool[src]

pub fn null(&self) -> bool[src]

pub fn len(&self) -> u32[src]

impl<T: Clone> List<T>[src]

pub fn prepend(self, x: T) -> Self[src]

pub fn append(self, item: T) -> Self[src]

pub fn concat(self, other: Self) -> Self[src]

pub fn get(&self, index: u32) -> Option<&T>[src]

pub fn head(&self) -> Option<&T>[src]

pub fn tail(&self) -> Self[src]

pub fn foldl<R>(self, func: fn(_: R, _: T) -> R, init: R) -> R[src]

pub fn map<R>(self, func: fn(x: T) -> R) -> List<R>[src]

pub fn filter(self, func: fn(_: &T) -> bool) -> Self[src]

Trait Implementations

impl<T: Clone> Clone for List<T>[src]

impl<T: Debug> Debug for List<T>[src]

impl<T: Eq> Eq for List<T>[src]

impl<'_, T: Clone> From<&'_ [T]> for List<T>[src]

impl<'_, T: Clone> From<Iter<'_, T>> for List<T>[src]

impl<T: PartialEq> PartialEq<List<T>> for List<T>[src]

impl<T> StructuralEq for List<T>[src]

impl<T> StructuralPartialEq for List<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for List<T> where
    T: RefUnwindSafe

impl<T> Send for List<T> where
    T: Send

impl<T> Sync for List<T> where
    T: Sync

impl<T> Unpin for List<T> where
    T: Unpin

impl<T> UnwindSafe for List<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.