array - pannous/wasp GitHub Wiki

Arrays and Vectors

Arrays are lists of fixed type and possibly predefined length. Vectors are (numerical) lists of fixed type and fixed length.

x:int[10]
y:char[20]
z:person[]

Note that in angle, char is shorthand for utf-8 character ( codepoint )

Internal note: Angle arrays are allocated in wasm linear memory, thus on 'heap' so to speak.

Todo: python style array or hash initialization: a=[] b={}

Education by compiler

vector / array => “generic lists are just written as the plural, in this case ‘persons’”

Tuples

A tuple is a list with fixed length and fixed size. A named tuple is a map with fixed keys, length and size.

⚠️ **GitHub.com Fallback** ⚠️