Yaaf.FSharp.Helper


Yaaf.FSharp.Helper

Overview

FSharpx.DataStructures
Microsoft.FSharp.Collections
Yaaf.FSharp.Collections
Yaaf.FSharp.Collections.Mutable
Yaaf.FSharp.Control
Yaaf.FSharp.Functional
Yaaf.FSharp.Helper
Yaaf.Helper
Yaaf.IO

Back to top FSharpx.DataStructures Namespace

ModuleDescription
RealTimeQueue

Back to top Microsoft.FSharp.Collections Namespace

ModuleDescription
ResizeArray

Generic operations on the type System.Collections.Generic.List, which is called ResizeArray in the F# libraries.

Back to top Yaaf.FSharp.Collections Namespace

TypeDescription
ByteString

An ArraySegment with structural comparison and equality.

DList<'T>

DList is an ordered linear structure implementing the List signature (head, tail, cons), end-insertion (conj), 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).

Deque<'T>

Double-ended queue is an ordered linear linear structure implementing the signature of List (head, tail, cons) as well as the mirror-image Vector signature (last, initial, conj). "head" inspects the first or left-most element in the structure, while "last" inspects the last or right-most element. "rev" (reverse) has time complexity O(1). Ordering is by insertion history.

Heap<'T>

Heap is an ordered linear structure where the ordering is either ascending or descending. "head" inspects the first element in the ordering, "tail" takes the remaining structure after head, and "insert" places elements within the ordering. PriorityQueue is available as an alternate interface. According to Okasaki the time complexity of the heap functions in this Heap implementation (based on the "pairing" heap) have "resisted" time complexity analysis.

HeapData<'T>
IPriorityQueue<'T>
LazyList<'T>

LazyLists are possibly-infinite, cached sequences. See also IEnumerable/Seq for uncached sequences. LazyLists normally involve delayed computations without side-effects. The results of these computations are cached and evaluations will be performed only once for each element of the lazy list. In contrast, for sequences (IEnumerable) recomputation happens each time an enumerator is created and the sequence traversed. LazyLists can represent cached, potentially-infinite computations. Because they are cached they may cause memory leaks if some active code or data structure maintains a live reference to the head of an infinite or very large lazy list while iterating it, or if a reference is maintained after the list is no longer required. Lazy lists may be matched using the LazyList.Cons and LazyList.Nil active patterns. These may force the computation of elements of the list.

NonEmptyList<'T>
PersistentVector<'T>

PersistentVector is an ordered linear structure implementing the inverse of the List signature, (last, initial, conj) in place of (head, tail, cons). Length is O(1). Indexed lookup or update (returning a new immutable instance of Vector) of any element is O(log32n), which is close enough to O(1) as to make no practical difference: a PersistentVector containing 4 billion items can lookup or update any item in at most 7 steps. Ordering is by insertion history. The original idea can be found in [Clojure](http://clojure.org/data_structures).

Queue<'T>

Queue is an ordered linear data structure where elements are added at the end (right) and inspected and removed at the beginning (left). Ordering is by insertion history. The qualities of the Queue structure make elements first in, first out (fifo). "head" inspects the first or left-most element in the structure, while "conj" inserts an element at the end, or right of the structure. Purely functional (immutable) Queue based on Okasaki's batched queue.

RandomAccessList<'T>

RandomAccessList is an ordered linear structure implementing the List signature (head, tail, cons), as well as inspection (lookup) and update (returning a new immutable instance) of any element in the structure by index. Length is O(1). Indexed lookup or update (returning a new immutable instance of RandomAccessList) of any element is O(log32n), which is close enough to O(1) as to make no practical difference: a RandomAccessList containing 4 billion items can lookup or update any item in at most 7 steps. Ordering is by insertion history. While PersistentVector<'T> is appending to the end this version prepends elements to the list.

ModuleDescription
Array

Extensions for F#'s Array module.

ByteString
DList
Deque
Dictionary

Extensions for System.Collections.Generic.Dictionary.

Exceptions
Heap
Interfaces
LazyList
List

Extensions for F#'s List module.

Literals
Map

Extensions for F#'s Map module.

NameValueCollection

Extensions for NameValueCollections.

NonEmptyList
PersistentVector

Defines functions which allow to access and manipulate PersistentVectors.

PriorityQueue
Queue
RandomAccessList

Defines functions which allow to access and manipulate RandomAccessLists.

Seq

Extensions for F#'s Seq module.

TimeMeasurement

Back to top Yaaf.FSharp.Collections.Mutable Namespace

TypeDescription
CircularBuffer<'T>

Back to top Yaaf.FSharp.Control Namespace

TypeDescription
Agent<'T>

Type alias for F# mailbox processor type

AsyncResult<'T>

Represents the reified result of an asynchronous computation

AsyncResultCell<'T>

When using .NET 4.0 you can replace this type by Task<'T>

AsyncSeq<'T>

An asynchronous sequence represents a delayed computation that can be started to produce either Cons value consisting of the next element of the sequence (head) together with the next asynchronous sequence (tail) or a special value representing the end of the sequence (Nil)

AsyncSeqInner<'T>

The interanl type that represents a value returned as a result of evaluating a step of an asynchronous sequence

AsyncStreamReader

Implements a TextReader-like API that asynchronously reads characters from a byte stream in a particular encoding.

AsyncWorker<'T>
AutoCancelAgent<'T>

Wrapper for the standard F# agent (MailboxProcessor) that supports stopping of the agent's body using the IDisposable interface (the type automatically creates a cancellation token)

BatchProcessingAgent<'T>

Agent that can be used to implement batch processing. It creates groups of messages (added using the Enqueue method) and emits them using the BatchProduced event. A group is produced when it reaches the maximal size or after the timeout elapses.

BlockingQueueAgent<'T>

Agent that implements an asynchronous queue with blocking put and blocking get operation (this implements the producer-consumer concurrent programming pattern). The constructor takes the maximal size of the buffer.

CircularQueueAgent<'T>

Agent that implements an asynchronous circular buffer with blocking enqueue and blocking dequeue operation (this implements the producer-consumer concurrent programming pattern). The constructor takes the maximal size of the buffer.

ConcurrentSetAgent<'T>

Agent that implements a simple concurrent set. The agent exposes a member that adds value to the set and returns whether the value was already present.

ISubject<'TIn, 'TOut>
ObservableExtensions
ObservableUpdate<'T>

Union type that represents different messages that can be sent to the IObserver interface. The IObserver type is equivalent to a type that has just OnNext method that gets 'ObservableUpdate' as an argument.

ReplaySubject<'T>
SlidingWindowAgent<'T>

Agent that implements the "sliding window" functionality. It collects messages added using the Enqueue method and emits them in overlapping groups of the specified size. For example, given [1,2,3,4,5...] and a size 3, the produced groups will be [1,2,3], [2,3,4], [3,4,5], ...

Subject<'T>
ModuleDescription
AsyncExtensions
AsyncSeq

Module with helper functions for working with asynchronous sequences

AsyncSeqExtensions
FileExtensions
Observable
Seq
StreamReaderExtensions
WebClientExtensions
WebRequestExtensions

Back to top Yaaf.FSharp.Functional Namespace

TypeDescription
Cont<'T, 'r>

The continuation monad. The algorithm is from Wes Dyer http://blogs.msdn.com/b/wesdyer/archive/2008/01/11/the-marvels-of-monads.aspx. The builder approach is from Matthew Podwysocki's excellent Creating Extended Builders series http://codebetter.com/blogs/matthew.podwysocki/archive/2010/01/18/much-ado-about-monads-creating-extended-builders.aspx. Current implementation from Matt's gist at https://gist.github.com/628956

Coroutine

The coroutine type from http://fssnip.net/7M

ISemigroup<'T>

Semigroup (set with associative binary operation)

Monoid<'T>

Monoid (associative binary operation with identity)

ModuleDescription
Async
ByteString
Choice
Continuation
Enumerator
List
Map
Monoid
Nullable
Operators

Generic monadic operators

Option
Prelude
Reader
Semigroup
Seq
Set
State
Task
Undo
Validation
Writer
ZipList

Back to top Yaaf.FSharp.Helper Namespace

ModuleDescription
Lazy

Back to top Yaaf.Helper Namespace

TypeDescription
AsyncLock
AsyncManualResetEvent
AsyncSemaphore
ICallContext
MyUnit
ObservableSource<'T>
VolatileBarrier
WorkerThread
pseq<'T>
ModuleDescription
ASeq
Async
AsyncExtensions
AsyncSeq
Core
Event
Lazy
Observable
Option
PSeq
Seq
Task

Back to top Yaaf.IO Namespace

TypeDescription
ConcurrentQueue<'a>
ConcurrentQueueMessage<'a>
IPeekStream<'a>
IStream<'a>
PeekMoreOption<'a>
PeekStream<'a>
StreamHelper
WrapperIStream<'a>

Note that this type is only for performance reasons Because the IStream is an asynchronous interface there will be no stackoverflows However it will slow down with each abstraction...

ModuleDescription
PeekStreamExtensions
Stream
StreamExtensions
Fork me on GitHub