[][src]Trait adapton::catalog::collections::ListIntro

pub trait ListIntro<X: 'static>: Debug + Clone + Hash + PartialEq + Eq + 'static {
    fn nil() -> Self;
fn cons(_: X, _: Self) -> Self;
fn name(_: Name, _: Self) -> Self;
fn art(_: Art<Self>) -> Self; fn singleton(hd: X) -> Self { ... }
fn name_art(nm: Option<Name>, rest: Self) -> Self { ... } }

Types that can be created like a list of X are ListIntro<X>

Required methods

fn nil() -> Self

Introduce an empty list

fn cons(_: X, _: Self) -> Self

Introduce a Cons cell

fn name(_: Name, _: Self) -> Self

Introduce a Name "cons" cell

fn art(_: Art<Self>) -> Self

Introduce a list with an articulation that holds a list

Loading content...

Provided methods

fn singleton(hd: X) -> Self

Creates a singleton list. Derived from cons and nil introduction forms.

fn name_art(nm: Option<Name>, rest: Self) -> Self

For Some(nm), wraps the given list in name and art constructors for given name nm. For None, is the list identity function.

Loading content...

Implementors

impl<X: 'static + Debug + Hash + PartialEq + Eq + Clone> ListIntro<X> for List<X>[src]

Loading content...