Logo Mibo

AListSliceExtensions Module

Slicing for adaptive lists (gap sheet §10.1): list.[a..b]. The bounds are clamped; the slice is the window [a, b] inclusive.

Type extensions

Type extension Description

this.GetSlice

Full Usage: this.GetSlice

Parameters:
    start : int option
    finish : int option

Returns: alist<'T>

Slicing: list.[a..b] (gap sheet §10.1). The bounds are clamped; the slice is the window [a, b] inclusive.

Extended Type: IAdaptiveList

start : int option
finish : int option
Returns: alist<'T>
Example

 let items = CList.ofSeq [ 0; 1; 2; 3; 4 ]
 let middle = (CList.value items).[1..3]   // [ 1; 2; 3 ]
val items: obj
val middle: obj

Type something to start searching.