aboutsummaryrefslogtreecommitdiff
path: root/man/man3/tomo-List.from.3
blob: e63a089cf41aad0c646c1f2d588eae62e451cf45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH List.from 3 2025-11-29 "Tomo man-pages"
.SH NAME
List.from \- slice an array from a start index
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI List.from\ :\ func(list:\ [T],\ first:\ Int\ ->\ [T])
.fi
.SH DESCRIPTION
Returns a slice of the list starting from a specified index.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx
l l l.
Name	Type	Description
list	[T]	The original list. 
first	Int	The index to start from. 
.TE
.SH RETURN
A new list starting from the specified index.

.SH EXAMPLES
.EX
assert [10, 20, 30, 40, 50].from(3) == [30, 40, 50]
.EE
.SH SEE ALSO
.BR Tomo-List (3)