FSharpPlus


DList<'T> Type

DList is an ordered linear structure implementing the List signature (head, tail, cons), end-insertion (add), and O(1) append. Ordering is by insertion history. DList is an implementation of [John Hughes' append list](http://dl.acm.org/citation.cfm?id=8475).

Constructors

Constructor Description

DList(length, data)

Full Usage: DList(length, data)

Parameters:
Returns: DList<'T>
length : int
data : DListData<'T>
Returns: DList<'T>

Instance members

Instance member Description

this.Add

Full Usage: this.Add

Parameters:
    x : 'T

Returns: DList<'T>

O(1). Returns a new DList with the element added to the end.

x : 'T
Returns: DList<'T>

this.Cons

Full Usage: this.Cons

Parameters:
    hd : 'T

Returns: DList<'T>

O(1). Returns a new DList with the element added to the front.

hd : 'T
Returns: DList<'T>

this.Head

Full Usage: this.Head

Returns: 'T

O(log n). Returns the first element.

Returns: 'T

this.IsEmpty

Full Usage: this.IsEmpty

Returns: bool

O(1). Returns true if the DList has no elements.

Returns: bool

this[index]

Full Usage: this[index]

Parameters:
    index : int

Returns: 'T
index : int
Returns: 'T

this.Length

Full Usage: this.Length

Returns: int

O(1). Returns the count of elememts.

Returns: int

this.Tail

Full Usage: this.Tail

Returns: DList<'T>

O(log n). Returns a new DList of the elements trailing the first element.

Returns: DList<'T>

this.TryHead

Full Usage: this.TryHead

Returns: 'T option

O(log n). Returns option first element

Returns: 'T option

this.TryTail

Full Usage: this.TryTail

Returns: DList<'T> option

O(log n). Returns option DList of the elements trailing the first element.

Returns: DList<'T> option

this.TryUncons

Full Usage: this.TryUncons

Returns: ('T * DList<'T>) option

O(log n). Returns option first element and tail.

Returns: ('T * DList<'T>) option

this.Uncons

Full Usage: this.Uncons

Returns: 'T * DList<'T>

O(log n). Returns the first element and tail.

Returns: 'T * DList<'T>

this.toSeq ()

Full Usage: this.toSeq ()

Returns: IEnumerator<'T>
Returns: IEnumerator<'T>

Static members

Static member Description

x + y

Full Usage: x + y

Parameters:
Returns: DList<'a>
x : DList<'a>
y : DList<'a>
Returns: DList<'a>

f <*> x

Full Usage: f <*> x

Parameters:
Returns: DList<'b>
f : DList<('a -> 'b)>
x : DList<'a>
Returns: DList<'b>

x <|> y

Full Usage: x <|> y

Parameters:
Returns: DList<'a>
x : DList<'a>
y : DList<'a>
Returns: DList<'a>

x >>= f

Full Usage: x >>= f

Parameters:
Returns: DList<'a>
x : DList<'a>
f : 'b -> DList<'a>
Returns: DList<'a>

DList.Fold(x, f, z)

Full Usage: DList.Fold(x, f, z)

Parameters:
    x : 'a
    f : 'a -> 'b -> 'a
    z : DList<'b>

Returns: 'a
x : 'a
f : 'a -> 'b -> 'a
z : DList<'b>
Returns: 'a

DList.Map(x, f)

Full Usage: DList.Map(x, f)

Parameters:
    x : DList<'a>
    f : 'a -> 'b

Returns: DList<'b>
x : DList<'a>
f : 'a -> 'b
Returns: DList<'b>

DList.OfSeq(x)

Full Usage: DList.OfSeq(x)

Parameters:
    x : seq<'a>

Returns: DList<'a>
x : seq<'a>
Returns: DList<'a>

DList.Return(x)

Full Usage: DList.Return(x)

Parameters:
    x : 'a

Returns: DList<'a>
x : 'a
Returns: DList<'a>

DList.ToList(x)

Full Usage: DList.ToList(x)

Parameters:
Returns: 'a list
x : DList<'a>
Returns: 'a list

DList.ToSeq(x)

Full Usage: DList.ToSeq(x)

Parameters:
Returns: seq<'a>
x : DList<'a>
Returns: seq<'a>

DList.append (left, right)

Full Usage: DList.append (left, right)

Parameters:
Returns: DListData<'a>
left : DListData<'a>
right : DListData<'a>
Returns: DListData<'a>

DList.appendLists (left, right)

Full Usage: DList.appendLists (left, right)

Parameters:
Returns: DList<'T>
left : DList<'T>
right : DList<'T>
Returns: DList<'T>

DList.fold f state l

Full Usage: DList.fold f state l

Parameters:
    f : 'State -> 'T -> 'State
    state : 'State
    l : DList<'T>

Returns: 'State
f : 'State -> 'T -> 'State
state : 'State
l : DList<'T>
Returns: 'State

DList.foldBack f l state

Full Usage: DList.foldBack f l state

Parameters:
    f : 'T -> 'State -> 'State
    l : DList<'T>
    state : 'State

Returns: 'State
f : 'T -> 'State -> 'State
l : DList<'T>
state : 'State
Returns: 'State

DList.get_Empty ()

Full Usage: DList.get_Empty ()

Returns: DList<'a>
Returns: DList<'a>

DList.get_Zero ()

Full Usage: DList.get_Zero ()

Returns: DList<'a>
Returns: DList<'a>

DList.head data

Full Usage: DList.head data

Parameters:
Returns: 'a
data : DListData<'a>
Returns: 'a

DList.ofSeq s

Full Usage: DList.ofSeq s

Parameters:
    s : seq<'T>

Returns: DList<'T>
s : seq<'T>
Returns: DList<'T>

DList.tryHead data

Full Usage: DList.tryHead data

Parameters:
Returns: 'a option
data : DListData<'a>
Returns: 'a option