llm
Download
45 lines 972 BGroffModified 2026-03-09 raw
123456789101112131415161718192021222324252627282930313233343536373839404142434445
'\" t
.\" Copyright (c) 2026 Bruce Hill
.\" All rights reserved.
.\"
.TH List.insert_all 3 2026-03-08 "Tomo man-pages"
.SH NAME
List.insert_all \- add multiple items to a list
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI List.insert_all\ :\ func(list:\ @[T],\ items:\ [T],\ at:\ Int\ =\ 0\ ->\ Void)
.fi
.SH DESCRIPTION
Inserts a list of items at a specified position in the list.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx lb
l l l l.
Name	Type	Description	Default
list	@[T]	The mutable reference to the list. 	-
items	[T]	The items to be inserted. 	-
at	Int	The index at which to insert the item. 	0
.TE
.SH RETURN
Nothing.

.SH NOTES
Since indices are 1-indexed and negative indices mean "starting from the back", an index of `0` means "after the last item".

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

list.insert_all([99, 100], at=2)
assert list == [10, 99, 100, 20, 30, 40]
.EE
.SH SEE ALSO
.BR Tomo-List (3)