1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00
ZoKrates/zokrates_cli/examples/book/generic_call.zok
2022-04-06 20:23:58 +02:00

9 lines
217 B
Text

def foo<N, P>() -> field[P] {
return [42; P];
}
def main() -> field[2] {
// `P` is inferred from the declaration of `res`, while `N` is provided explicitly
field[2] res = foo::<3, _>();
return res;
}