Slice
Generated from the engine's own definition: compute-engine's symbol, which we neither extend nor document by hand. No examples yet — the crosswalk is the reason it has a page.
Return a contiguous run of elements from an indexed collection. Given start and end (1-based, inclusive), a negative index is counted from the end and out-of-bounds indices are clamped. Given a range (an ascending index span such as 2..4), returns the elements at those indices: Slice(xs, r) is Slice(xs, First(r), Last(r)).
Slice((value: T, span: range) -> T where T: string) & ((value: T, span: nothing | range) -> T | nothing where T: string) & ((value: T, start: number, end: number) -> T where T: string) & ((value: indexed_collection<T>, span: range) -> list<T> where T: any) & ((value: indexed_collection<T>, span: nothing | range) -> list<T> | nothing where T: any) & ((value: indexed_collection<T>, start: number, end: number) -> list<T> where T: any)as compute-engine declares itTyped signatures
| Type | Package | Applies |
|---|---|---|
((value: T, span: range) -> T where T: string) & ((value: T, span: nothing | range) -> T | nothing where T: string) & ((value: T, start: number, end: number) -> T where T: string) & ((value: indexed_collection<T>, span: range) -> list<T> where T: any) & ((value: indexed_collection<T>, span: nothing | range) -> list<T> | nothing where T: any) & ((value: indexed_collection<T>, start: number, end: number) -> list<T> where T: any) | compute-engine | always |