Header menu logo Deedle

DataSegment Module

Provides helper functions and active patterns for working with `DataSegment` values

Functions and values

Function or value Description

data ds

Full Usage: data ds

Parameters:
Returns: 'a

Returns the data property of the specified `DataSegment`

ds : DataSegment<'a>
Returns: 'a

kind ds

Full Usage: kind ds

Parameters:
Returns: DataSegmentKind

Returns the kind property of the specified `DataSegment`

ds : DataSegment<'a>
Returns: DataSegmentKind

Active patterns

Active pattern Description

(|Any|) ds

Full Usage: (|Any|) ds

Parameters:
Returns: DataSegmentKind * 'T
 A complete active pattern that extracts the kind and data from a `DataSegment`
 value. This makes it easier to write functions that only need data:

    let sumAny = function DataSegment.Any(_, data) -> Stats.sum data
ds : DataSegment<'T>
Returns: DataSegmentKind * 'T

(|Complete|Incomplete|) ds

Full Usage: (|Complete|Incomplete|) ds

Parameters:
Returns: Choice<'a, 'a>
 Complete active pattern that makes it possible to write functions that behave
 differently for complete and incomplete segments. For example, the following
 returns zero for incomplete segments:

     let sumSegmentOrZero = function
       | DataSegment.Complete(value) -> Stats.sum value
       | DataSegment.Incomplete _ -> 0.0
ds : DataSegment<'a>
Returns: Choice<'a, 'a>

Type something to start searching.