Deedle


ReadOnlyCollection

Namespace: Deedle.Internal

Provides helper functions for working with ReadOnlyCollection<T> similar to those in the Array module. Most importantly, F# 3.0 does not know that array implements IList<T>.

Functions and values

Function or valueDescription
empty
Signature: ReadOnlyCollection<'T>
Type parameters: 'T

Returns empty readonly collection

fold op init list
Signature: op:('b -> 'T -> 'b) -> init:'b -> list:ReadOnlyCollection<'T> -> 'b
Type parameters: 'b, 'T

Fold elements of the ReadOnlyCollection

foldOptional op init list
Signature: op:('b -> 'T -> 'b) -> init:'b -> list:ReadOnlyCollection<OptionalValue<'T>> -> 'b
Type parameters: 'b, 'T

Fold elements of the ReadOnlyCollection, skipping over missing values

length(list)
Signature: list:ReadOnlyCollection<'T> -> int
Type parameters: 'T

Count elements of the ReadOnlyCollection

map f list
Signature: f:('T -> 'a) -> list:ReadOnlyCollection<'T> -> ReadOnlyCollection<'a>
Type parameters: 'T, 'a

Transform all elements of ReadOnlyCollection using the specified function

ofArray(array)
Signature: array:'T [] -> ReadOnlyCollection<'T>
Type parameters: 'T

Converts an array to ReadOnlyCollection.

ofSeq(seq)
Signature: seq:seq<'T> -> ReadOnlyCollection<'T>
Type parameters: 'T

Converts a lazy sequence to fully evaluated ReadOnlyCollection

reduce op list
Signature: op:('T -> 'T -> 'T) -> list:ReadOnlyCollection<'T> -> 'T
Type parameters: 'T

Reduce elements of the ReadOnlyCollection

reduceOptional op list
Signature: op:('T -> 'T -> 'T) -> list:ReadOnlyCollection<OptionalValue<'T>> -> 'T opt
Type parameters: 'T

Reduce elements of the ReadOnlyCollection, skipping over missing values

Fork me on GitHub