LanguageExt.Core

LanguageExt.Core Immutable Collections Iterator DSL

Contents

class Iterator <A> Source #

class Cons Source #

Cons iterator case.

Contains a head value and a tail that represents the rest of the sequence.

Methods

method void Deconstruct (out A head, out Iterator<A> tail) Source #

class Iterator <A> Source #

class Iterator <A> Source #

class Iterator <A> Source #

class Iterator <A> Source #

class Iterator <A> Source #

class Nil Source #

Nil iterator case

The end of the sequence.

Fields

field Iterator<A> Default = new Nil() Source #

Properties

property A Head Source #

Head element

property Iterator<A> Tail Source #

Tail of the sequence

property bool IsEmpty Source #

Return true if there are no elements in the sequence.

property long Count Source #

Return the number of items in the sequence.

Requires all items to be evaluated, this will happen only once however.

Methods

method string ToString () Source #

method Iterator<A> Clone () Source #

Clone the iterator so that we can consume it without having the head item referenced. This will stop any GC pressure.

method Iterator<A> Split () Source #

When iterating a sequence, it is possible (before evaluation of the Tail) to Terminate the current iterator and to take a new iterator that continues on from the current location. The reasons for doing this are to break the linked-list chain so that there isn't a big linked-list of objects in memory that can't be garbage collected.

Parameters

returns

New iterator that starts from the current iterator position

method void Dispose () Source #