Dart DocumentationpersistentLList<A>

LList<A> abstract class

abstract class LList<A> {
 factory LList.nil() => new Nil<A>();
 factory LList.cons(A x, LList<A> xs) => new Cons<A>(x, xs);

 bool isNil();
 Cons<A> asCons();

 void foreach(f(A));
 // forall B, LList<B> map(B f(A))
 LList map(f(A));
 LList<A> filter(bool f(A));

 int length();
}

Subclasses

LListBase<A>

Constructors

factory LList.cons(A x, LList<A> xs) #

factory LList.cons(A x, LList<A> xs) => new Cons<A>(x, xs);

factory LList.nil() #

factory LList.nil() => new Nil<A>();

Methods

abstract Cons<A> asCons() #

abstract LList<A> filter(bool f(A)) #

abstract void foreach(f(A)) #

abstract bool isNil() #

abstract int length() #

abstract LList map(f(A)) #