Skip to content

module internal.types.array

Source: stdlib/internal/types/array.codon


Array[T] @extend Class is extended to add given methods

Magic methods

__new__(ptr: Ptr[T], sz: int) @pure Function has no side effects and returns same value for same inputs @derives Function return value captures arguments @llvm Function is implemented with inline LLVM IR

%0 = insertvalue { i64, ptr } undef, i64 %sz, 0
%1 = insertvalue { i64, ptr } %0, ptr %ptr, 1
ret { i64, ptr } %1

__new__(sz: int) @overload Function is overloaded

__copy__(self)

__deepcopy__(self)

__len__(self)

__bool__(self)

__getitem__(self, index: int)

__setitem__(self, index: int, what: T)

Methods

slice(self, s: int, e: int)


array = Array


List[T]

Fields

len: int

arr: Array[T]

T: type