This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy at the same URL with .md appended. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation
Standard Library

std.collections

Types

Type Description
List<T> A list that grows as items are added.

List<T>

Implements Enumerable<T> and Display.

Member Description
List<T>::new() -> List<T> Creates an empty list.
add(item: T) Adds the item to the end of the list.
count() -> i32 Returns the number of items.
get(index: i32) -> T Returns the item at the index. Panics if the index is out of range.
set(index: i32, item: T) Replaces the item at the index. Panics if the index is out of range.
clear() Removes all items.
to_array() -> T[] Copies the items into an array.
Mew is a programming language under construction.