1234567891011121314151617181920212223242526272829303132333435363738 | '\" t
.\" Copyright (c) 2026 Bruce Hill
.\" All rights reserved.
.\"
.TH List.shuffle 3 2026-03-08 "Tomo man-pages"
.SH NAME
List.shuffle \- shuffle a list in place
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI List.shuffle\ :\ func(list:\ @[T],\ random:\ func(min,max:Int64->Int64)?\ =\ none\ ->\ Void)
.fi
.SH DESCRIPTION
Shuffles the elements of the list in place.
.SH ARGUMENTS
.TS
allbox;
lb lb lbx lb
l l l l.
Name Type Description Default
list @[T] The mutable reference to the list to be shuffled. -
random func(min,max:Int64->Int64)? If provided, this function will be used to get a random index in the list. Returned values must be between \fBmin\fR and \fBmax\fR (inclusive). (Used for deterministic pseudorandom number generation) none
.TE
.SH RETURN
Nothing.
.SH EXAMPLES
.EX
nums := &[10, 20, 30, 40]
nums.shuffle()
# E.g. [20, 40, 10, 30]
.EE
.SH SEE ALSO
.BR Tomo-List (3)
|