llm
Download
45 lines 944 BGroffModified 2026-03-09 raw
123456789101112131415161718192021222324252627282930313233343536373839404142434445
'\" t
.\" Copyright (c) 2026 Bruce Hill
.\" All rights reserved.
.\"
.TH List.remove_at 3 2026-03-08 "Tomo man-pages"
.SH NAME
List.remove_at \- remove an item by index
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI List.remove_at\ :\ func(list:\ @[T],\ at:\ Int\ =\ -1,\ count:\ Int\ =\ 1\ ->\ Void)
.fi
.SH DESCRIPTION
Removes elements from the list starting at a specified index.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx lb
l l l l.
Name	Type	Description	Default
list	@[T]	The mutable reference to the list. 	-
at	Int	The index at which to start removing elements. 	-1
count	Int	The number of elements to remove. 	1
.TE
.SH RETURN
Nothing.

.SH NOTES
Since negative indices are counted from the back, the default behavior is to remove the last item.

.SH EXAMPLES
.EX
list := &[10, 20, 30, 40, 50]
list.remove_at(2)
assert list == [10, 30, 40, 50]

list.remove_at(2, count=2)
assert list == [10, 50]
.EE
.SH SEE ALSO
.BR Tomo-List (3)