Introducing the fixed size array type to the language:
let arr1: [u64; 5] = [1,2,3,4,5];
let arr2: Span<u64> = [1,2,3,4,5].span();
In addition, we'll have the capability of defining const fixed size array, which are analogous to dw in CairoZero:
const arr: [u64; 5] = [1,2,3,4,5];
To pass the const value cheaply between functions (without copying), you should pass box as follows:
fn get_arr(arr: Box<[u64; 5]>) { ... }
get_arr(BoxTrait::new(arr));
Introducing the fixed size array type to the language:
In addition, we'll have the capability of defining const fixed size array, which are analogous to
dwin CairoZero:To pass the const value cheaply between functions (without copying), you should pass box as follows: