1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00
ZoKrates/zokrates_cli/examples/book/structs.zok
2021-07-28 00:11:18 +02:00

14 lines
244 B
Text

struct Bar<N> {
field[N] c
bool d
}
struct Foo<P> {
Bar<P> a
bool b
}
def main() -> (Foo<2>):
Foo<2>[2] f = [Foo { a: Bar { c: [0, 0], d: false }, b: true}, Foo { a: Bar {c: [0, 0], d: false}, b: true}]
f[0].a.c = [42, 43]
return f[0]