Mojo function
shuffle
shuffle[T: CollectionElement, //](mut list: List[T])
Shuffles the elements of the list randomly.
Performs an in-place Fisher-Yates shuffle on the provided list.
Parameters:
- T (
CollectionElement
): The type of element in the List.
Args:
- list (
List[T]
): The list to modify.

Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!