1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/zokrates_cli/examples/alias/basic_aliasing.zok
2022-06-21 15:03:53 +02:00

15 lines
323 B
Text

type byte = u8;
type uint32 = u32;
type UInt32Array<N> = uint32[N];
type matrix<R, C> = field[R][C];
def fill<R, C>(field v) -> matrix<R, C> {
return [[v; C]; R];
}
def main(uint32 a, uint32 b) -> (UInt32Array<2>, matrix<2, 4>) {
UInt32Array<2> res = [a, b];
matrix<2, 4> m = fill(1);
return (res, m);
}